Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oE0oRMQvi0E4 for ; Wed, 8 Feb 2012 15:55:21 +0100 (CET) Received: from nm13.bullet.mail.ird.yahoo.com (nm13.bullet.mail.ird.yahoo.com [77.238.189.66]) by mail.saout.de (Postfix) with SMTP for ; Wed, 8 Feb 2012 15:55:21 +0100 (CET) References: <1328567304.90926.YahooMailNeo@web29602.mail.ird.yahoo.com> <20120207081135.GC17107@tansi.org> Message-ID: <1328712920.43192.YahooMailNeo@web29603.mail.ird.yahoo.com> Date: Wed, 8 Feb 2012 14:55:20 +0000 (GMT) From: Mickael In-Reply-To: <20120207081135.GC17107@tansi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [dm-crypt] Re : Poor performances with nfs and Kernel 3.x Reply-To: Mickael List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "dm-crypt@saout.de" > =C0=A0: dm-crypt@saout.de=0A> Cc=A0: =0A> Envoy=E9 le : Mardi 7 f=E9vri= er 2012 9h11=0A> Objet=A0: Re: [dm-crypt] Poor performances with nfs and K= ernel 3.x=0A> =0A> On Mon, Feb 06, 2012 at 10:28:24PM +0000, Mickael wrote:= =0A>> Hello,=0A>>=0A>> I'm writing about poor performances accessing a dm-c= rypt/LUKS partition=0A>> using nfs.=0A>> =0A>> I was running a fileserver U= buntu_Server_11.04 (Kernel 2.6.38-13#52) with=0A>> no problem.=A0 But after= an upgrade to Ubuntu_Server_11.10 (Kernel=0A>> 3.0.0-15#26) reading and wr= iting a crypted partition with nfs is very=0A>> slow.=0A>=0A>Interesting. I= think have no issues here with Debian stable and Kernel=0A>3.2.2 on the se= rver and 3.1.6 on the client. =0A>=0A>What is the kernel version on your cl= ient?=0A=0AMy client is an Unbutu 3.0.0-15#26 amd64 (2 CPU)=0AResults are t= he same, using a 2.6 or 3.0 Kernel on the client.=0AThe problem seems to be= located on the server only=0A=0A>3.0.0 is not a very good kernel though wi= th a number of issues. =0A>There is also a local privilege excalation in 3.= x that has been =0A>fixed only in 3.2.2 and later. (Unless Ubuntu did it.)= =0A=0AI've build a Fedora 16 (3.2.1-3) with no change=0AI need to find a di= stro with a recent Kernel (>3.2.2) to test if it solve the problem=0A=0A>= =0A>> =0A>> I've made different tests with a 2GB file to show the differenc= e when the=0A>> server is running a 2.6 or 3.0 kernel.=A0 All others parame= ters are always=0A>> the same.=0A>> =0A>> First, a test using nfs to access= a crypted partition (dm-crypt/LUKS/ext4)=0A>> on the server:=0A>>=0A>> *Sv= r Kernel 3.0.0-15#26? : NFS (R/W) =3D 30 MB/s / 33 MB/s?? <-------- The pro= blem is here !=0A>> *Svr Kernel 2.6.38-13#52 : NFS (R/W) =3D 81 MB/s / 53 M= B/s=0A>>=0A>> As you can see, with the Kernel 3.0, performances are very ba= d. The flow=0A>> is always constant at ~30MB; there's clearly a limitation= =0A>=0A>What did you use to do the benchmark? =0A=0AJust coying a 2GB avi f= ile with=0Atime cp /tmp/testfile.avi /mnt/CRYPT/=0Aand calculate the averag= e speed (2000MB/time_sec)=0A=0A=0A>=0A>> For comparison, the same test, but= this time, using nfs to read and write=0A>> a non-crypted partition (ext4)= (same HD of the crypted partition):=0A>>=0A>> *Svr Kernel 3.0.0-15#26? : N= FS (R/W) =3D 92 MB/s / 77 MB/s=0A>> *Svr Kernel 2.6.38-13#52 : NFS (R/W) = =3D 111 MB/s / 74 MB/s=0A>> Using nfs without dm_crypt, performances are go= od with the 2 Kernels=0A>=0A>Interesting.=0A>=0A>I will do a benchmark here= and see whether I have the same.=0A>=0A>Arno=0A>=0A>------ Cut ------=0A>= =0A>-- =0A>Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno= @wagner.name =0A>GnuPG:=A0 ID: 1E25338F=A0 FP: 0C30 5782 9D93 F785 E79C=A0 = 0296 797F 6B50 1E25 338F=0A>----=0A>One of the painful things about our tim= e is that those who feel certainty =0A>are stupid, and those with any imagi= nation and understanding are filled =0A>with doubt and indecision. -- Bertr= and Russell =0A>_______________________________________________=0A>dm-crypt= mailing list=0A>dm-crypt@saout.de=0A>http://www.saout.de/mailman/listinfo/= dm-crypt=0ADe=A0: Arno Wagner =0A