LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-05-2003, 02:36 AM   #1
gongli
Member
 
Registered: Apr 2003
Posts: 32

Rep: Reputation: 15
high priority process?


hi

i have a numerical method which i run on my linux box unattended. i need to get the most speed on this process, it can take upto 30 hours to process. i therefore dont run x windows or anything else when i run the method. there are no other processes or users other than the numerical method and slackware.

to get the most speed, i was wondering if i should run it as root, or use the nice command, or does the slackware stuff not eat up too much time?

thanks
-gong
 
Old 08-05-2003, 09:28 AM   #2
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
maybe you can run it in init 1 (single user mode)

to do this you can edit /etc/inittab. I am not sure whether that will help much.
 
Old 08-05-2003, 10:17 AM   #3
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware
Posts: 262

Rep: Reputation: 30
You should definitely use the "nice" command. Try "man nice", I think something like this:

nice -19 name_of_program

The above command should give the program almost absolute priority over everything else. If you program is such a guzzler of CPU, I suggest buying an Opteron machine, and compiling your program to take advantage of that CPU...

[30 hours of processing? Wow!]
 
Old 08-05-2003, 08:34 PM   #4
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
How bout a smp machine? Maybe you can take advantage of the PowerPC G4 (& G5) processor which have SIMD, they call it AltiVec. Maybe this is just a useless suggestion.
 
Old 08-06-2003, 05:47 AM   #5
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware
Posts: 262

Rep: Reputation: 30
Maybe running the program with "nice -19" will solve the time problem... And I don't think there is a version of Slackware for PowerPC machines...
 
Old 08-08-2003, 01:03 PM   #6
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
I thought you had to pass in -19 so the command is nice --19 (two dashes:Bash, csh seems to have different syntax where one dash means negative). Anyway it is easy to verify.

For example, I use
nice --20 xmms

ps -ef |grep xmms
root 4907 1142 0 12:56 ? 00:00:00 xmms

top -p 4907
4907 root 0K -20 10552 10M 5392 S < 0.0 4.1 0:00 xmms

Let's just say that I can do anything, burn CDs at 24, download, compile and run tuxracer in parallel and have never had playback skip.

Redhat supports -20, I have read on google that some only support up to negative 19.

Also, you have to be root to be able to go to negative (higher than normal) priority

RO.
(Yes I su to root for XMMS, probably shouldn't, but ....)
 
  


Reply


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X Process: Occasional High CPU Load Fahrion Linux - Software 6 07-16-2005 06:47 PM
Problem about process priority gunp66 Programming 9 05-16-2005 09:14 AM
What's the default priority of a process? Nerox Programming 2 04-08-2005 11:13 AM
Change process priority ]SK[ Linux - Software 11 02-24-2005 08:00 PM
Changing Process Priority in Linux w/ System Call sptchamp Programming 2 07-21-2004 09:58 AM


All times are GMT -5. The time now is 07:12 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration