LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2011, 10:31 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Question /etc/security/limits.conf and nice


If I add
Code:
user - nice -20
to /etc/security/limits.conf, what exactly will it change?

"user" will have right to run all apps down to "-20" nice
or
all apps from "user" will automatically start with nice "-20"?
 
Old 02-19-2011, 11:00 AM   #2
goodhombre
Member
 
Registered: Mar 2010
Location: Ungheni, Rep. Moldova
Distribution: Ubuntu
Posts: 82

Rep: Reputation: 20
Hi,

From limits.conf man page
Quote:
nice
maximum nice priority allowed to raise to (Linux 2.6.12 and higher)
In your case :

"user" will have right to run all apps down to "-20" nice.
 
1 members found this post helpful.
Old 02-19-2011, 11:39 AM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,326

Rep: Reputation: 253Reputation: 253Reputation: 253
Nevertheless I wouldn't allow a user to run something at nice -20. User processes should be in the range 0 to 19 to leave room for kernel tasks. As long as there are more cores than active processes all will run at maximum speed anyway (there are are no processes to be nice to in this case). And even if a machine is oversubscribed, the nice values are relative: e.g. whether all user processes have a nice value of 0 or all have a nice value of 19 wouldn't change anything for them.
 
1 members found this post helpful.
Old 02-19-2011, 03:38 PM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
I run Firefox with nice -4, is it better then 0?
 
Old 02-19-2011, 05:44 PM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,326

Rep: Reputation: 253Reputation: 253Reputation: 253
What do you mean by “better”? As the name implies, it means to be nice to other processes. When there are none additional (user-) processes, there is noone to be nice to. With a negative value you could transcribe it with “cheecky”, as it might block important kernel tasks.

From a user experience on an otherwise empty machine, you shouldn't see any difference between nice 0 and nice 19 anyway.
 
  


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
ulimit and /etc/security/limits.conf chakkerz Linux - General 2 01-23-2011 02:42 AM
etc/security/limits.conf - what does it do? Ken_1969 Red Hat 5 03-14-2010 05:25 PM
/etc/security/limits.conf reverse Linux - Security 4 10-20-2007 04:10 PM
meaning of /etc/security/limits.conf commands marceluda Linux - Security 1 05-11-2006 12:01 PM
/etc/security/limits.conf documentation? crazyeddie740 Linux - Security 1 06-19-2004 04:02 AM


All times are GMT -5. The time now is 08:15 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration