Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-20-2005, 09:37 PM   #1
Registered: Mar 2005
Location: Canada
Distribution: Mandrake 10.1 Official
Posts: 34

Rep: Reputation: 15
how to limit the cpu power a program gets?

im trying to play Xcom 1 and 2, they both run under linux with cedega but the problem is that these games were written for 486s and it runs way too fast on my athlon to the point where it is unplayable. so what im wondering is if there is a way to limit the cpu power that the game can use, so that the game would run as if it were on a 486?
Old 04-20-2005, 10:49 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,898

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Yes. There is a way. Look into the command: nice (see the man pages for nice). You first must find out the PID (process id number) of the app when it's running, then renice that number (change the cpu scheduling priority of that process) to use less of the cpu.
Old 04-20-2005, 11:58 PM   #3
Registered: Oct 2003
Location: Mississauga, ON
Distribution: Ubuntu 9.04
Posts: 494

Rep: Reputation: 30
Anyone got more detailed instructions? man pages are too technical, I tried to do what the man page said and nothing happened.
Old 04-21-2005, 12:35 AM   #4
Registered: Mar 2005
Location: Canada
Distribution: Mandrake 10.1 Official
Posts: 34

Original Poster
Rep: Reputation: 15
ok this is what i typed in:

nice --adjustment=19 cedega terror.exe

the man page said 19 is the lowest it could go so i tried that. the game takes longer to start now, but once it loads it runs at the same speed as before. is there another way to restrict the power some more?
Old 04-21-2005, 06:34 AM   #5
Senior Member
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
i don't think so, its a kernel problem, the kernel decided what processes (tread) gets the CPU, and for how long. The niceness only has noticeable effect when multiple programs are running (that eat the CPU), so all you have is a game, and the system is under no real load, the kernel will give that process a lot of CPU time.

its just a extremely poorly written software, beyond a kernel patch to restrict CPU time of a process (I'm not sure how that would work, or if there is one), theres not much hope.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit Cpu Use Of Threads yakotey Programming 1 10-03-2005 10:12 AM
Limit the performance of CPU? LostIn Linux - Hardware 8 05-23-2005 08:32 PM
Enabling power save/power management/cpu freq scaling features for a Debian system zero79 Debian 0 12-19-2004 02:17 PM
what means cpu limit? joda Linux - General 0 01-15-2004 10:23 AM
Limit CPU on Certain Apps? GT_Onizuka Linux - Newbie 3 11-16-2003 03:05 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration