Date: Sat, 9 Mar 2013 16:07:41 -0800 From: Ben Cottrell <tamino@wolfhut.org> To: mexas@bristol.ac.uk Cc: freebsd-questions@freebsd.org Subject: Re: how to forbid a process to use swap? Message-ID: <4E64D344-5552-444B-B915-A0773A848379@wolfhut.org> In-Reply-To: <201303092355.r29NtRX4015510@mech-cluster241.men.bris.ac.uk> References: <201303092355.r29NtRX4015510@mech-cluster241.men.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 9, 2013, at 15:55, Anton Shterenlikht <mexas@bristol.ac.uk> wrote: > I run a program that uses large arrays. > I don't want it to use swap, because it's > too slow. I want the program to fail when > there's not enough RAM, rather than using > swap. How to do this? If it were me I would start with mlockall() and work from there... do you have source code to the program in question? You could also play with resource limits, just from the shell (ulimit in sh, limit in csh) -- but that's less of an exact science, since you don't *know* for sure how much memory the process will be able to use before swap starts being used. ~Ben
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E64D344-5552-444B-B915-A0773A848379>