LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 09: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, 10:00 AM   #2
goodhombre
Member
 
Registered: Mar 2010
Location: Ungheni, Rep. Moldova
Distribution: Ubuntu
Posts: 89

Rep: Reputation: 22
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, 10:39 AM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
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, 02: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, 04:44 PM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:23 PM.

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