LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-20-2005, 08:37 PM   #1
learnmelinux
Member
 
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, 09:49 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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, 10:58 PM   #3
vincebs
Member
 
Registered: Oct 2003
Location: Mississauga, ON
Distribution: Ubuntu 9.04
Posts: 496

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-20-2005, 11:35 PM   #4
learnmelinux
Member
 
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, 05:34 AM   #5
SciYro
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.
 
  


Reply



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 09:12 AM
Limit the performance of CPU? LostIn Linux - Hardware 8 05-23-2005 07:32 PM
Enabling power save/power management/cpu freq scaling features for a Debian system zero79 Debian 0 12-19-2004 01:17 PM
what means cpu limit? joda Linux - General 0 01-15-2004 09:23 AM
Limit CPU on Certain Apps? GT_Onizuka Linux - Newbie 3 11-16-2003 02:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:27 AM.

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