On Fri, 21.06.13 13:42, Holger Hans Peter Freyther (hol...@freyther.de) wrote:
> > On Fri, Jun 21, 2013 at 12:29:56PM +0200, Kay Sievers wrote: > > > What's the problem with using address *space*? Address space is not > > used memory, file memory mappings are just how things work in general, > > they are cheap and should not really matter. > > It is a symptom of inefficiency. If an application maps 130MB of memory > to manage what should be a 648kb ringbuffer it raises some doubts. The Well, we could use much smaller windows too. And constantly remap them when we need too. > danger comes from the question if the journald will fragment its memory > in a way that a real memory allocation will fail because there is no space > left in the virtual address space. There's a cache of memory maps. And an upper limit on how many we keep. The idea is basically to map generously, reuse as much as we can, but ensure that we don't eat up everything available. Mmaps after they have been created are relatively cheap. Creating them however is expensive. Hence we try to get the most out of the minimum of maps. Which is a recipe for efficiency... That said, the current map sizes are nothing we tuned particularly. If you can show actal performance benefits I am happy to change them. Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel