FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-06-2011, 02:50 PM
darkestkhan
 
Default Setting CPU affinity for binaries in given directory

I have BOINC installed in ~/BOINC/ directory and all processes BOINC
manager is launching are launched from subdirectories of this
directory. It seems like scheduler is moving them from core 0 to core
1 and back, but I would like to avoid this since they are
computationally intensive and those jumps are causing NOTICEABLE
difference in responsiveness of my machine (which most likely means
also wasted CPU cycles) (and when there are no such things with CPU
affinity set up, but I know only how to do it with htop, which in long
run is a no-go). Is there any way to specify CPU affinity for binaries
launched from given directory (and it's subdirectories) ?

darkestkhan
------------------------------------------
Feel free to CC me.
jid: darkestkhan@gmail.com
May The Source be with You.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTi=AkMMgMwbsafRuWvtk6YrcsY99KQ@mail.gmail.com ">http://lists.debian.org/BANLkTi=AkMMgMwbsafRuWvtk6YrcsY99KQ@mail.gmail.com
 
Old 06-06-2011, 06:15 PM
William Hopkins
 
Default Setting CPU affinity for binaries in given directory

On 06/06/11 at 02:50pm, darkestkhan wrote:
> Is there any way to specify CPU affinity for binaries
> launched from given directory (and it's subdirectories) ?

AFAIK, no. You can set up a process watcher to scan for processes with a certain name and set their affinity, or you can call the processes with a set affinity at start. If you're calling an executable, call it with a processor affinity (which should be inherited by child processes). If it's a script, modify it to call with affinity.

The command to set affinity on a running process, or launch a new process with given CPU affinity is 'taskset'.

--
Liam
 
Old 06-06-2011, 10:14 PM
darkestkhan
 
Default Setting CPU affinity for binaries in given directory

2011/6/6 William Hopkins <we.hopkins@gmail.com>:
> On 06/06/11 at 02:50pm, darkestkhan wrote:
>> Is there any way to specify CPU affinity for binaries
>> launched from given directory (and it's subdirectories) ?
>
> AFAIK, no. You can set up a process watcher to scan for processes with a certain name and set their affinity, or you can call the processes with a set affinity at start. If you're calling an executable, call it with a processor affinity (which should be inherited by child processes). If it's a script, modify it to call with affinity.
>
> The command to set affinity on a running process, or launch a new process with given CPU affinity is 'taskset'.
>
> --
> Liam
>

If I set CPU affinity of BOINC manager will also programs launched by
BOINC manager have set CPU affinity?

darkestkhan
------------------------------------------
Feel free to CC me.
jid: darkestkhan@gmail.com
May The Source be with You.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTi=GA+m59SaU7jtn6T7dCRRw4gsPyg@mail.gmail.com ">http://lists.debian.org/BANLkTi=GA+m59SaU7jtn6T7dCRRw4gsPyg@mail.gmail.com
 
Old 06-06-2011, 11:07 PM
William Hopkins
 
Default Setting CPU affinity for binaries in given directory

On 06/06/11 at 10:14pm, darkestkhan wrote:
> 2011/6/6 William Hopkins <we.hopkins@gmail.com>:
> > On 06/06/11 at 02:50pm, darkestkhan wrote:
> >> Is there any way to specify CPU affinity for binaries
> >> launched from given directory (and it's subdirectories) ?
> >
> > AFAIK, no. You can set up a process watcher to scan for processes with a certain name and set their affinity, or you can call the processes with a set affinity at start. If you're calling an executable, call it with a processor affinity (which should be inherited by child processes). If it's a script, modify it to call with affinity.
> >
> > The command to set affinity on a running process, or launch a new process with given CPU affinity is 'taskset'.
> >
> > --
> > Liam
> >
>
> If I set CPU affinity of BOINC manager will also programs launched by
> BOINC manager have set CPU affinity?
It depends on how the BOINC manager calls programs. I would try it and see.

--
Liam
 
Old 06-07-2011, 09:38 AM
darkestkhan
 
Default Setting CPU affinity for binaries in given directory

2011/6/6 William Hopkins <we.hopkins@gmail.com>:
> On 06/06/11 at 10:14pm, darkestkhan wrote:
>> 2011/6/6 William Hopkins <we.hopkins@gmail.com>:
>> > On 06/06/11 at 02:50pm, darkestkhan wrote:
>> >> Is there any way to specify CPU affinity for binaries
>> >> launched from given directory (and it's subdirectories) ?
>> >
>> > AFAIK, no. You can set up a process watcher to scan for processes with a certain name and set their affinity, or you can call the processes with a set affinity at start. If you're calling an executable, call it with a processor affinity (which should be inherited by child processes). If it's a script, modify it to call with affinity.
>> >
>> > The command to set affinity on a running process, or launch a new process with given CPU affinity is 'taskset'.
>> >
>> > --
>> > Liam
>> >
>>
>> If I set CPU affinity of BOINC manager will also programs launched by
>> BOINC manager have set CPU affinity?
> It depends on how the BOINC manager calls programs. I would try it and see.
>
> --
> Liam
>

I did test it and it seems like after setting CPU affinity for BOINC
manager the programs it is calling/launching have the same CPU
affinity that BOINC manager.
Thx for help

darkestkhan
------------------------------------------
Feel free to CC me.
jid: darkestkhan@gmail.com
May The Source be with You.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTinL-ctQQiF3BTVgZLBDMUmQKsGeOQ@mail.gmail.com">http://lists.debian.org/BANLkTinL-ctQQiF3BTVgZLBDMUmQKsGeOQ@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 01:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org