Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Possibility to set a maximum memory limit for applications?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Wed Sep 30, 2009 9:10 pm    Post subject: Possibility to set a maximum memory limit for applications? Reply with quote

Hi

Today I had the problem that firefox was eating up all my memory, so my system started swapping and everything started to lag and I had to hard reset. (The same thing happened before with other apps, wine for example)

So I was wondering if its possible to set a global memory limit for all applications. This would my sense I think, because usually when an application/process starts using more than 80% of the physical ram it has a memory leak or another grave problem.

Thanks for any hints.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Wed Sep 30, 2009 10:24 pm    Post subject: Reply with quote

There is /etc/security/limits.conf

but it would probably be a better idea to find out what is causing those problems and fix them

please post your emerge --info
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Oct 01, 2009 6:51 am    Post subject: Reply with quote

Mike Hunt wrote:
There is /etc/security/limits.conf



Yes I looked into that file but didn't find the right option. Would it be memlock or just data?
Code:

data
    maximum data size (KB)
memlock
    maximum locked-in-memory address space (KB)


Quote:

but it would probably be a better idea to find out what is causing those problems and fix them

please post your emerge --info


The last time it happened it was not on a gentoo machine. However the wine issue was on my gentoo laptop. But if its caused by proprietary code we can't fix much, so I still think its a rather sane idea to set those limits.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum