Questions and Answers :
Unix/Linux :
what determines idle/in-use: detecting remote activity so boinc will suspend
Message board moderation
Author | Message |
---|---|
Send message Joined: 11 Feb 05 Posts: 4 Credit: 32,274 RAC: 0 |
I set boinc to suspend when my linux machine (ubuntu 5.04/Gnome) is in use. It suspends just fine when I sit down at the display and use the mouse/keyboard/whatever. But I also log into remotely via ssh/x11 and use firefox, shell commands, et al. How does boinc detect when the machine is \"idle\"? Is there a way to get either linux/gnome or boinc to realize the machine is in use by watching for remote activity? Or can I run some sort of program to say \"hey boinc - I\'m using it now, back off for 20 minutes\"? |
Send message Joined: 6 Aug 04 Posts: 65 Credit: 1,605,224 RAC: 0 |
Nealmcb: boinc and climate predcition under Linux use the nice levels. Boinc defaults to a nice level of 19 which is the lowest (man nice for more information). This means that if almost anything happens on your system your kernel will give the processing power over to the other applications preferentially over boinc. Under Windows boinc uses a normal priority and the distributed computing apps (eg CP) have a priority set to the lowest. There was a discussion on the at the end of 2004 in reference to CP classic if you want to try searching the other message board for more information. DaveN |
Send message Joined: 11 Feb 05 Posts: 4 Credit: 32,274 RAC: 0 |
> boinc and climate predcition under Linux use the nice levels. Boinc defaults > to a nice level of 19 which is the lowest (man nice for more information). > This means that if almost anything happens on your system your kernel will > give the processing power over to the other applications preferentially over > boinc. Thanks, setting "nice" levels would help with CPU contention. But my issue, which seems much more common these days, is memory contention. Performance is terrible when boinc is forcing other applications to use a lot of swap space. So I set this preference to "no": "Leave applications in memory while preempted? (suspended applications will consume swap space if 'yes')" But that doesn't kick in unless boinc actually gets suspended, so I really want boinc to notice when I'm actively using other applications, and to start back up when that activity ceases. The trick is how to get boinc to notice remote activity. I'd even settle for a way to manually say "suspend for an hour" or something like that. But I don't want to have to remember to restart boinc. |
Send message Joined: 5 Aug 04 Posts: 1283 Credit: 15,824,334 RAC: 0 |
> But my issue, which seems much more common these days, is memory contention. > Performance is terrible when boinc is forcing other applications to use a lot > of swap space. So I set this preference to "no": "Leave applications in > memory while preempted? (suspended applications will consume swap space if > 'yes')" The only option that gets anywhere close to what you're asking for is the % virtual memory space limit in general preferences, but that includes both physical memory and swap space. BOINC and CPDN should be using no more than 50 of your 250MB. I doubt if it'll have any effect, but you could try reducing the limit to 20 or 25. <br><a href="http://www.teampicard.net/"><img src="http://www.teampicard.net/images/picardmini.gif"></a><a href="http://climateapps2.oucs.ox.ac.uk/cpdnboinc/team_display.php?teamid=3">Join us here</a> |
Send message Joined: 11 Feb 05 Posts: 4 Credit: 32,274 RAC: 0 |
> The only option that gets anywhere close to what you're asking for is the % > virtual memory space limit in general preferences, but that includes both > physical memory and swap space. BOINC and CPDN should be using no more than > 50 of your 250MB. I doubt if it'll have any effect, but you could try > reducing the limit to 20 or 25. > <br><a href="http://www.teampicard.net/"><img> src="http://www.teampicard.net/images/picardmini.gif"></a><a> href="http://climateapps2.oucs.ox.ac.uk/cpdnboinc/team_display.php?teamid=3">Join > us here</a> My goal is to get boinc to suspend and automatically resume later on, not to hobble it when I'm not around. I'm guessing that the answer lies in a lower layer, something in GNOME or X11, that lets a user do the equivalent of pretending to move the mouse or type on the keyboard, such that boinc would notice that. What would help is an indication of what function boinc calls to detect "idle" activity on Linux, so I can find documentation on that API. |
Send message Joined: 3 Sep 04 Posts: 268 Credit: 256,045 RAC: 0 |
Using a VNC connexion will enable you to suspend boinc when you move your mouse/keyboard. Of course it's not as secure as an ssh connexion, but it works fine for me. But Boinc is really "invisible" with Linux, so I don't really see the point of suspending it to use Firefox or shell/etc. |
Send message Joined: 5 Aug 04 Posts: 1283 Credit: 15,824,334 RAC: 0 |
> What would help is an indication of what function boinc calls to detect "idle" > activity on Linux, so I can find documentation on that API. It calls stat(2) for the mouse and all tty devices and checks that the idle period set in your general preferences has elapsed between the current time and 'st_atime' for all of them. If you use the command-line parameter '-check_all_logins' the check will be on the device for each login. <br><a href="http://www.teampicard.net/"><img src="http://www.teampicard.net/images/picardmini.gif"></a><a href="http://climateapps2.oucs.ox.ac.uk/cpdnboinc/team_display.php?teamid=3">Join us here</a> |
Send message Joined: 11 Feb 05 Posts: 4 Credit: 32,274 RAC: 0 |
> If you use the command-line parameter '-check_all_logins' the check will be on > the device for each login. Excellent - now that I think of it, I remember that - thanks. Running it that way, all I have to do is log in via another ssh connection and interact with a shell there, and boinc frees up its memory and goes away for 20 minutes. I did notice that it isn't enough to type something in a window that isn't listening to me yet (e.g. in a window that is doing a "tail" on the log file). Which makes sense, since it is the "access" time, not the "write" time, that is being checked. So the shell (or htop, or something else) has to actually read the characters I type.... Now I'm a happy camper again, able to let it run without it getting my way too much, though it still does take some time for other applications to get their memory pages back in main memory. Firefox can get huge, e.g. 230 MB, when I have a few dozen tabs open (as is my habit :-), so taking 20 or 50 MB can make a difference. |
©2024 cpdn.org