Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
If it's cool to you then it is CUFP. That's just the way art is. Some like it, some don't.
TY! I hope that more people would have got the irony behind this thing...
Why did you choose to fork instead of maybe trying to nice down his processes as low as possible? You
That's more or less a long story, so I'll tell you one of those anecdotes I've avoided up until now... this guy at times is running some numerical simulation programs of his own. So every now and again you do log on a machine and notice that it is particularly slow. You launch 'top' and you notice an 'a.out' of his own taking as high as 98% of the CPU. He often does this on more than half of the most performant machines at a time.

By the end of August he's been noticed running one of these simulations on the server!! At this point a friend of mine who happens to be one of the sysadmins too wrote him an email kindly (no sarcasm intended this time: he's really a pleasant and kind person!) asking him to stop doing so and use one of the clients instead. And he didn't get any answer...

Exactly one month later I was running a somewhat CPU intensive program of my own ("of course" it was in perl and it was... ehm for a JAPH, see Re^2: My 1st post (japh) for more info). I would like to stress that I had carefully made sure that (i) no more than one instance of it could ever run on each node, (ii) it was launched with nice 18, (iii) it correctly trapped signals to be stopped at any time if needed.

I must say that a few users noticed my process running in the background, and indeed one of them asked me (in other words, but the sense was this) if I were stealing computing power away from him. I gently explained him that at nice 18 I was only using a small fraction of the CPU's resources and that he could run all of the programs he liked. I must admit that I was slightly disappointed by receiving his mail, but all in all he was honest and smart enough to accept my answer. Also, he was sensible enough to talk me face to face.

At this point do you guess what happened? The other guy answered the mail he had not answered for a month. This is what he wrote, in his typical attitude (that I can only partly translate into English, the original text is Italian):

I didn't know that *** was the server, it seemed to be only virgin land where to run my processes. I'll set out for foreign's country.

What do you think, instead, about imposing some rules to limit savage running on part of some users (like *** -Note: that's my username- who currently occupies almost all of the good machines (*** -Note: snip list-) with processes that often last for weeks.

I'm not saying that if everybody were just as reckless (even if I'm noticing as a pleasant surprise that he has discovered 'nice' since a few days ago) as he his it would be catastrophic, but two of them would be enough.

I snip the rest, but it's along the same lines. Needless to say, the sysadmins solidarized with me, I was sent a copy of this mail and answered him personally, telling him what I thought of him, etc.
could even add that to his .profile or add an if to the system wide profile. Instead of forking you
But I do not have superuser powers (even if I've been a sysadmin here too, in the past). But then even if had them, I really would consider it to be unethical to use them for this sort of personal revenge: I could never ever do anything like that.
could gobble up as much memory as possible then release it on his logout? Or finding their ip address and flooding it with useless udp packets? I ask because
Yes, I could have done something like this too. But this was also an excuse to find a motivation to deepen my knowledge of signal trapping and process management programming techniques.

I want him to log into a machine and see its load get as high as 100, launching top or ps and see more than a hundred processes of mine, all of which, BTW, have the same name as his login...

Yes: this is not really a malicious program, but it is definitely a means of making fun of him! Of course I will remove it after his first angry mail...

slowing the entire machine down would seem to cause you problems as well as him...
Not at all. The one and only possible (but unprobable!) damage for any other user could be a noticeable delay when trying to log into a machine. But as soon as they succeed in logging in (and they do!), the load will decrease rapidly.
Has it ever gotten out of control and overrun your machine? Just wondering :-) Hope your friend doesn't read perlmonks.
Nope, it has never got out of control. Also, he's not my friend. He's an idiot (and an idiot with an attitude too), period. And I couldn't care less if he read this: I already told him what I think of him, and many others did too.

In reply to Re^2: A (highly) "ethical" use for for Perl by blazar
in thread A (highly) "ethical" use for for Perl by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-24 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found