change in 'memlock' value of 'limits.conf' in the wiki

How can I make this site better? Let me know what you'd like to see!

Moderators: khz, MattKingUSA

User avatar
raboof
Established Member
Posts: 1770
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: change in 'memlock' value of 'limits.conf' in the wiki

Post by raboof »

studio32 wrote:I got the advise in jack messages not to use unlimited but @audio - memlock 971112
in /etc/limits.conf instead...
Did it say why (or link to more details)?
studio32

Re: change in 'memlock' value of 'limits.conf' in the wiki

Post by studio32 »

raboof wrote:
studio32 wrote:I got the advise in jack messages not to use unlimited but @audio - memlock 971112
in /etc/limits.conf instead...
Did it say why (or link to more details)?
It was a short message. If I remember well it says something about that unlimited is dangerous usage.
I was a bit surprised that is says /etc/limits.conf and not /etc/security/limits.conf


edit: I've asked it on #jack and they say
1) because you dont want your system stuff to stay without swapped out forever
2) probably math (total ram - constant)
3) location of the file is probably distro dependent

it's probably not really computer dependant. it's up to you. ie, you are saying "i'm happy for you to lock up to this amount of memory, no more". if jackd tried to use (and lock) more than a gig of ram, I'd be a little worried and want it to stop.

in practice, you wouldn't expect the limit to be reached, it's just a safeguard in case something goes wrong and it does reach it

rule of thumb: i'd say.... total ram - 20%, plus or minus 50% to taste :-)

if you start getting errors with apps dying because they are hitting the limit, review.
So total ram - 20%... as a new rule of thumb...!?
User avatar
Yeri
Established Member
Posts: 158
Joined: Tue Dec 09, 2008 6:33 pm
Location: Spain

Re: change in 'memlock' value of 'limits.conf' in the wiki

Post by Yeri »

So total ram - 20%... as a new rule of thumb...!?
It certainly would avoid apps to lock the whole ram without preventing high demanding apps from running (that was my main aim when suggested the change).
Probably the best is as mentioned by raboof, to set the soft limit to a safe value (e.g. ram - 50%) and the hard to a limit value (ram - 10% or even 'unlimited') and start the high demanding apps (that we known that don't freeze the system) with the command 'ulimit' so as to raise the soft limit.
Post Reply