View previous topic :: View next topic |
Author |
Message |
Eidi Tux's lil' helper
Joined: 02 Sep 2004 Posts: 82 Location: Arizona
|
Posted: Sat Mar 18, 2006 9:34 pm Post subject: How do I allow a chroot to use only 1 processor? |
|
|
I'm really not sure how to ask this, or even if I'm saying it right, but I have an Athlon 64 X2, and I'm wondering if I can set up a chroot to use only 1 of the 2 processors in it.
The reason being is that a game I play has issues with a multiple processor system, which I can run fine under Cedega. And I was just thinking about how to make it only use 1 processor... So, yeah.
This is probably an odd request, purposefully gimping your system, but I'm wondering if it can be done while the main install is able to use both cores.
Thanks in advance for any help. |
|
Back to top |
|
|
Aries-Belgium l33t
Joined: 08 Jul 2005 Posts: 730 Location: Willebroek, Belgium
|
Posted: Sat Mar 18, 2006 11:21 pm Post subject: |
|
|
It's a long shot, but you could disable smp in the kernel of the chroot ...
I think the second core isn't recognized then, but I'm not sure ... _________________ Ep2.nl | Developers Community |
|
Back to top |
|
|
Eidi Tux's lil' helper
Joined: 02 Sep 2004 Posts: 82 Location: Arizona
|
Posted: Sun Mar 19, 2006 3:12 am Post subject: |
|
|
I think the chroot uses your currently running kernel, I don't think it has a kernel all for itself.
I know virtual machines like VMWare and Xen uses a new kernel for each machine, I may have to do that if it's unable to be done via a chroot... But can they make use of NVidia 3D acceleration?
I could be wrong, but I don't think a new kernel is used for a chroot. |
|
Back to top |
|
|
Aries-Belgium l33t
Joined: 08 Jul 2005 Posts: 730 Location: Willebroek, Belgium
|
Posted: Sun Mar 19, 2006 3:43 am Post subject: |
|
|
Yeah, you're right.
Can I ask, why exactly you need a chroot to play a game?
Vmware uses a virtual vmware adapater, so I don't know it has opengl support and stuff ... _________________ Ep2.nl | Developers Community |
|
Back to top |
|
|
alistair Retired Dev
Joined: 15 Jul 2005 Posts: 869
|
Posted: Sun Mar 19, 2006 3:48 am Post subject: |
|
|
I have no experience with this but couldn't you set the processor affinity at runtime or before.
So if the exe is located in the chroot then you set a processor. This is the hard bit as I dont know if you can find out where a processes exe is located (especially with respect to the the real /) _________________ ______________
Help the gentoo-java project. Visit Gentoo Java Project
what good are admin powers if you don't abuse them for personal gain - mark_alec |
|
Back to top |
|
|
Eidi Tux's lil' helper
Joined: 02 Sep 2004 Posts: 82 Location: Arizona
|
Posted: Sun Mar 19, 2006 4:32 am Post subject: |
|
|
I might try VMWare if it supports that, but I honestly have no clue.
If I started Cedega with a processor affinity at runtime, would any child processes also have that processor affinity? It might work that way. I dunno how to do a processor affinity though.
I dunno if I need a chroot or not, I was just thinking it might be better to play games in 32-bit mode instead of 64, but I dunno if that'll change anything or not, honestly. |
|
Back to top |
|
|
niallm n00b
Joined: 05 Jul 2004 Posts: 3
|
Posted: Mon Mar 20, 2006 5:07 pm Post subject: |
|
|
You can specify how many processors you want each virtual machine to have with Xen so this might be of some use to you. Might be hard to get the direct hardware acceleration for the nvidia card working with xen.
Dont think VMware would work well for this at all if the game needs 3d acceleration as last time I looked anyway vmware just presents the card as a standard VGA card. |
|
Back to top |
|
|
tcfelker n00b
Joined: 24 Jun 2003 Posts: 46
|
Posted: Tue Mar 21, 2006 12:16 am Post subject: |
|
|
Code: |
emerge schedtool
schedtool -a 1 -e command
|
Anything you put for command, and all of its children, will be forced to run on the first CPU. Use -a 2 to force to the second CPU or -a 3 to force for both (it's a bitmask). The game may still detect the system as SMP, but if the problems simply come from race conditions exacerbated by having multiple CPUs, this should help.
Don't waste your time with the kernel inside the chroot, that will have no effect, as processes inside the chroot are still using the same kernel as outside. |
|
Back to top |
|
|
Eidi Tux's lil' helper
Joined: 02 Sep 2004 Posts: 82 Location: Arizona
|
Posted: Tue Mar 21, 2006 8:32 pm Post subject: |
|
|
Ah, thank you very much. Seems like it works, woot!
Thanks again! |
|
Back to top |
|
|
|