Re: speeding up swapoff

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Hugh Dickins <hugh@...>
Cc: Eric W. Biederman <ebiederm@...>, <linux-mm@...>, <linux-kernel@...>
Date: Thursday, August 30, 2007 - 11:05 am

On Thu, 2007-08-30 at 11:36 +0100, Hugh Dickins wrote:

There are some issues with us using mlockall. Admittedly, most/all of
them are not the kernels problem (but a fast swapoff would be a good
workaround):

We're using python 2.4, so mlock() itself isn't really an option (we
don't realistically have access to the address regions hidden behind the
language). mlockall() is a possibility, but the fact that all
allocations above a particular limit will fail would potentially cause
us problems given that it's hard to control python's memory usage for a
long-running application.

Additionally, choosing that limit is hard given that we have this
real-time and non-real-time processing balance, plus an interactive
python-based application that runs all the time (which is the thing we
would be locking). python 2.4 never returns memory to the OS, so at
whatever point the memory usage of the application peaks, all that
memory remains locked permanently.

In addition we have the non-real-time processing task which does benefit
from having more memory available, so in that case, we would want it to
swap out parts of the application. I guess we could ask the application
to do munlockall() here, but things start getting scary and
overcomplicated at this point...

So, our arguments against mlockall() are not strong, but you can see why
fast swapoff would be mighty convenient.

Thanks for all the info so far. It does sound like my earlier idea
wouldn't be any faster in the general case due to excess disk seeking.
Oh well...

-- 
Daniel Drake
Brontes Technologies, A 3M Company
http://www.brontes3d.com/opensource

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
speeding up swapoff, Daniel Drake, (Wed Aug 29, 9:29 am)
Re: speeding up swapoff, Lee Schermerhorn, (Wed Aug 29, 12:08 pm)
Re: speeding up swapoff, Hugh Dickins, (Wed Aug 29, 11:36 am)
Re: speeding up swapoff, Eric W. Biederman, (Thu Aug 30, 4:27 am)
Re: speeding up swapoff, Hugh Dickins, (Thu Aug 30, 6:36 am)
Re: speeding up swapoff, Daniel Drake, (Thu Aug 30, 11:05 am)
Re: speeding up swapoff, Arjan van de Ven, (Wed Aug 29, 10:30 am)
Re: speeding up swapoff, Hugh Dickins, (Wed Aug 29, 11:58 am)
Re: speeding up swapoff, Daniel Drake, (Wed Aug 29, 10:44 am)
Re: speeding up swapoff, Andi Kleen, (Sat Sep 1, 6:20 pm)
Re: speeding up swapoff, Bill Davidsen, (Thu Aug 30, 11:57 am)
Re: speeding up swapoff, Juergen Beisert, (Wed Aug 29, 11:12 am)
Re: speeding up swapoff, Oliver Neukum, (Wed Aug 29, 10:36 am)
Re: speeding up swapoff, Hugh Dickins, (Wed Aug 29, 12:04 pm)
Re: speeding up swapoff, Oliver Neukum, (Wed Aug 29, 12:18 pm)