emacs-devel
[Top][All Lists]
Advanced

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

Re: warn-maybe-out-of-memory


From: Dmitry Antipov
Subject: Re: warn-maybe-out-of-memory
Date: Tue, 15 Jul 2014 08:44:27 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 07/15/2014 07:45 AM, Stefan Monnier wrote:

Freeing space from the cache is a trivial action.

AFAICS on Linux, this is not true - in my tests, huge allocations
may be 20% slower when the kernel should reclaim cache space first.
This may be even slower if an OS has to increase swap space
(according to Eli, this may happen on MS-Windows).

The OS wants to keep as much stuff in the cache as it can, thus
minimizing the "free" space, since "free" here basically means "wasted".

This depends on usage patterns. If you interleave I/O and relatively
large allocations, it's fairly unreasonable to fill almost all memory
with cached data just to throw it away very soon.

If your "free" includes "free in RAM + free in swap" then it's
marginally more useful ("free in RAM" will usually be close to 0,
whereas "free in swap" should usually be fairly large), but I still
can't think of a frequent enough configuration and situation where this
would be useful enough to justify wasting code on it.

This is not expected to be frequent.

Dmitry




reply via email to

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