From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fep31.mx.upcmail.net (fep31.mx.upcmail.net [62.179.121.49]) by mail.saout.de (Postfix) with ESMTP for ; Sun, 14 Nov 2010 01:51:52 +0100 (CET) Date: Sun, 14 Nov 2010 01:35:52 +0100 From: Carlo Wood Message-ID: <20101114003552.GA9904@alinoe.com> References: <20101112165136.GA23352@tansi.org> <4CDDAB0C.1020603@redhat.com> <20101113145346.GA12522@tansi.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Subject: Re: [dm-crypt] system freezes when using swap that is encrypted List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nicolas Bock Cc: dm-crypt@saout.de Hi all! I've been a member of this list for a long long time, and what-do-you-know, I finally see something that I can respond to :) I have the following problem for a long time now: whenever my system uses all memory (and would start to use swap) it freezes. I can't even remote login anymore - although there remains a desktop image on the monitor. Only possible option is to reboot. I use the following configuration for my swap: /etc/fstab: /dev/mapper/cswap none swap sw,pri=3D1 0 0 /etc/crypttab: cswap /dev/md1 /dev/random swap /dev/md1 is a 16 GB partition on my RAID 5 with three disks. Could this be related? On Sat, Nov 13, 2010 at 11:49:53AM -0700, Nicolas Bock wrote: > The interesting thing is though that when I make the 2 swap partitions > regular swap, i.e. not encrypted, then the same program does not get > OOM killed and the system stays responsive all the way to the end of > allocating the 10GB. So it's not a problem of memory pressure, it's > rather related to the fact that the swap is encrypted. >=20 > nick >=20 > On Sat, Nov 13, 2010 at 07:53, Arno Wagner wrote: > > On Fri, Nov 12, 2010 at 08:40:43PM -0700, Nicolas Bock wrote: > >> I think I have ruled out now that this is a hard crash. I have 8GB of > >> physical memory and another 8GB as swap. I allocated 10GB in a C > >> program and after it had written to about =A07GB or so, the system > >> froze. But after maybe 20 minutes the system got unstuck and had > >> killed the job. Since I am on amd64, I am not sure why the job got > >> killed, it should certainly have had enough memory to write to. > > > > I don't know what criteria lead to activation of the OOM killer, > > but I use one application that allocates up to 150 MB of memory, > > but never uses (accesses) it. This app runs fine in a qemu > > with 16MB RAM and 200MB swap. It is possible that your process > > gets killed, if it uses more memory than the larger of swap > > and main memory. > > > > Arno > > > > > > -- > > Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner= .name > > GnuPG: =A0ID: 1E25338F =A0FP: 0C30 5782 9D93 F785 E79C =A00296 797F 6B5= 0 1E25 338F > > ---- > > Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans > > > > If it's in the news, don't worry about it. =A0The very definition of > > "news" is "something that hardly ever happens." -- Bruce Schneier --=20 Carlo Wood