The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* VM - is "reserved memory for root" possible (in case of a leak)?
@ 2004-07-07  7:37 Tomasz Chmielewski
  2004-07-07  8:32 ` FabF
  0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Chmielewski @ 2004-07-07  7:37 UTC (permalink / raw)
  To: linux-kernel

Hello,

Short nature of a problem:

Recently I was playing with Apache2 as a proxy + mod_clamav as a virus 
scanner, put some load to it, and in a short time hanged the machine 
(actually, it was short of memory, and it stopped to respond - in logs I 
saw VM was killing some other processes, unfortunately not Apache).

As I could reach the machine only remotely, it was no wonder I run into 
troubles...

Sounds familiar?


Solution?

I was thinking, if there is something like:

"reserved_min_memory_for_root = 10M"
"reserved_min_memory_processes = /usr/sbin/sshd, /usr/sbin/pppd, etc.etc"

Which would just give that memory for those processes "once and for 
all", and thus, saving trouble in case of a memory leak, uncontrolled 
process, or similar.

I know it would be tricky to implement it, because the question arises, 
what happens if we have no memory left, and these 
"reserved_min_memory_processes" begin to grow?

But I think it would be something like a comparison:

ulimit vs this "reserved_min_memory_for_root", and
quota vs -m option from mke2fs.

Is there something like it already in the kernel?


It would be similar to mke2fs for the filesystem:

# man mke2fs

-m reserved-blocks-percentage
               Specify the percentage of the filesystem blocks reserved 
for the
               super-user.  This value defaults to 5%



Regards,

Tomasz Chmielewski


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: VM - is "reserved memory for root" possible (in case of a leak)?
  2004-07-07  7:37 VM - is "reserved memory for root" possible (in case of a leak)? Tomasz Chmielewski
@ 2004-07-07  8:32 ` FabF
  0 siblings, 0 replies; 2+ messages in thread
From: FabF @ 2004-07-07  8:32 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: linux-kernel

On Wed, 2004-07-07 at 09:37, Tomasz Chmielewski wrote:
> Hello,
> 
> Short nature of a problem:
> 
> Recently I was playing with Apache2 as a proxy + mod_clamav as a virus 
> scanner, put some load to it, and in a short time hanged the machine 
> (actually, it was short of memory, and it stopped to respond - in logs I 
> saw VM was killing some other processes, unfortunately not Apache).
> 
> As I could reach the machine only remotely, it was no wonder I run into 
> troubles...
> 
> Sounds familiar?
> 
> 
> Solution?
> 
> I was thinking, if there is something like:
> 
> "reserved_min_memory_for_root = 10M"
> "reserved_min_memory_processes = /usr/sbin/sshd, /usr/sbin/pppd, etc.etc"
> 
> Which would just give that memory for those processes "once and for 
> all", and thus, saving trouble in case of a memory leak, uncontrolled 
> process, or similar.
> 
> I know it would be tricky to implement it, because the question arises, 
> what happens if we have no memory left, and these 
> "reserved_min_memory_processes" begin to grow?
> 
> But I think it would be something like a comparison:
> 
> ulimit vs this "reserved_min_memory_for_root", and
> quota vs -m option from mke2fs.
> 
> Is there something like it already in the kernel?
> 
> 
> It would be similar to mke2fs for the filesystem:
> 
> # man mke2fs
> 
> -m reserved-blocks-percentage
>                Specify the percentage of the filesystem blocks reserved 
> for the
>                super-user.  This value defaults to 5%
Hi Tomasz,

Maybe you would want to tune /proc/sys/vm/min_free_kbytes or renice +xx
apache.Some vmstat 1 report, uname -a could be interesting as
well.There's no per profile VM granularity in 2.6.

Regards,
FabF

> 
> 
> 
> Regards,
> 
> Tomasz Chmielewski
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-07  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-07  7:37 VM - is "reserved memory for root" possible (in case of a leak)? Tomasz Chmielewski
2004-07-07  8:32 ` FabF

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox