qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends
Date: Sun, 06 Dec 2009 19:59:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091203 Fedora/3.0-3.13.rc2.fc12 Thunderbird/3.0

On 12/06/2009 07:47 PM, malc wrote:

It will never fail on Linux.  On other hosts it prevents a broken oom handler
from taking the guest down a death spiral.
It fails here all the time i'm sorry to say, i have overcommit disabled
(mostly because kpdf when doing a text search tends to overwhelm the VM
subsystem and Linux happily picks X11 as it's OOM kill target)

Right, I meant under the default configuration. Unfortunately there is no good configuration for Linux - without strict overcommit you'll invoke the oom killer, with strict overcommit you'll need ridiculous amounts of swap because fork() and MAP_PRIVATE require tons of backing store.

On my home machine I have

  $ grep Commit /proc/meminfo
  CommitLimit:     7235160 kB
  Committed_AS:    4386172 kB

So, 4GB of virtual memory needed just to run a normal desktop with thunderbird+firefox. Actual anonymous memory is less than 2GB, so you could easily run this workload on a 2GB machine without swap, but with strict overcommit 2GB RAM + 2GB swap will see failures even though you have free RAM.

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]