cpu affinity process hlds multiple
Hi all, I did a search for info on this subject to no avail. So here i am asking for your expertise on this matter.
I have a dual xeon 3Gig CPU rig on fedora core 6 and i'm trying to run two 32 slot Dayofdefeat servers with one on each CPU. Can anyone shed any light on how i would go about setting the affinity for each HLDs process. Do i use taskset and if so how. The reason i'm asking how is because i have just started to learn the shell and i dont want to screw anything up too badly. I would greatly appreciate any and all help on this matter. I'm not that knowledgeable about linux but i know HLDS like the back of my hand, So if anyone needs any help setting up servers dont hesitate to ask or PM me. Thanks for such an informative site. |
Quote:
Quote:
You can use taskset to set the affinity for an already-running process (by its PID) or set the affinity with which to launch a process (by specifying the command and its arguments). Btw, is there any particular reason you need to alter cpu affinities? The linux scheduler does a pretty good job of using all resources efficiently. Anyway, if you want something a little more sophisticated than cpu affinity (e.g., ability to control memory mappings, etc.) you could always check out cpusets. |
I just wanted to see if i could get as much performance out of the box that i can but i am seeing that fedora does do a pretty good job of managing resources. Thanks very much for that info, I'll add it to my memory banks and i'll post back if i see any benefit of setting the cpu affinity. ;)
[EDIT] Ok i found this just for info. to set affinity, use the "taskset" program that comes with schedutils. examples: /usr/bin/taskset -p 01 9381 << pid /usr/bin/taskset -p 02 132 << pid /usr/bin/taskset -p 03 3049 << pid first line tells kernel to run process #9381 (this is the pid you get in ps) on the first cpu. second line tells kernel to run process #132 on the second cpu. third line, tells the kernel to run process #3049 on both cpus (3=1+2, bitwise) ie. if you have a quad box and you want to run process 85 on the third cpu. /usr/bin/taskset -p 04 85 would do it. or, to run it on cpus 1 and 4, i'd use -p 09. |
All times are GMT -5. The time now is 06:00 PM. |