From: =?UTF-8?B?SmVucyBLcmVoYmllbC1HcsOkdGhlcg==?= Subject: Poor write-performance with nfs Date: Wed, 24 Nov 2010 19:38:45 +0100 Message-ID: <4CED5BB5.9080900@jkg-it-services.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Hi! I have a question about nfs-performance. I don't where the problem is. My setup: Host dom0 with 8TB harddisk space 8GB RAM and 6 core CPU. The hard disk raid is fast: root@midas-phalanx:/data# time dd if=3D/dev/zero of=3Dtest.null bs=3D1M c= ount=3D1024 1024+0 Datens=C3=83=C2=A4tze ein 1024+0 Datens=C3=83=C2=A4tze aus 1073741824 Bytes (1,1 GB) kopiert, 3,27874 s, 327 MB/s real 0m3.303s user 0m0.004s sys 0m1.792s so the write performance is very good on harddisk. I created several domU guests which do a nfs-boot from the local host.=20 (strange setup, I know). I don't want to define the size of guests disk=20 so I don't want to use a image as hard disk image. This is why I do a=20 nfs-boot. The dom0 exports the file system for the guest. I use network bridging.=20 My guest config file is the following: kernel =3D '/boot/vmlinuz-2.6.32-5-xen-amd64' ramdisk =3D '/boot/initrd.img-2.6.32-5-xen-amd64' memory =3D 1024 name =3D 'ufp-mysql-01' hostname =3D 'ufp-mysql-01' #dhcp =3D 'dhcp' vif =3D [ 'mac=3D00:16:3e:00:42:06, bridge=3Dlan' ] interface =3D 'eth0' ip =3D '10.10.42.206' netmask =3D '255.255.255.0' gateway =3D '10.10.42.204' nfs_server =3D '10.10.42.108' nfs_root =3D '/data/nfs-root/ufp-mysql-01' root =3D '/dev/nfs' extra =3D '2 console=3Dhvc0 xencons=3Dtty boot=3Dnfs rootfstype= =3Dnfs' The guest boots without error. But the write performance over the nfs is=20 very poor: root@ufp-mysql-01:~# time dd if=3D/dev/zero of=3Dtest.null bs=3D1M count=3D= 512 512+0 Datens=C3=A4tze ein 512+0 Datens=C3=A4tze aus 536870912 Bytes (537 MB) kopiert, 2159,08 s, 249 kB/s real 35m59.133s user 0m0.000s sys 0m1.396s The read-performance is good: root@ufp-mysql-01:~# dd if=3Dtest.null of=3D/dev/zero bs=3D1M 512+0 Datens=C3=A4tze ein 512+0 Datens=C3=A4tze aus 536870912 Bytes (537 MB) kopiert, 0,705893 s, 761 MB/s But it is not the performance of the server itself: root@ufp-mysql-01:~# dd if=3D/dev/zero of=3D/dev/null bs=3D1M count=3D512 512+0 Datens=C3=A4tze ein 512+0 Datens=C3=A4tze aus 536870912 Bytes (537 MB) kopiert, 0,0655885 s, 8,2 GB/s OK, this is the setup where the nfs-server is on dom0 and exports the=20 filesystem for domU. When I copy the rootfs to another computer and export it from there=20 (with same export options) I get a lot of more performance. This is the guest bootet from nfs on other server: root@ufp-mysql-01:~# time dd if=3D/dev/zero of=3Dtest.null bs=3D1M count=3D= 512 512+0 Datens=C3=A4tze ein 512+0 Datens=C3=A4tze aus 536870912 Bytes (537 MB) kopiert, 15,506 s, 34,6 MB/s real 0m15.617s user 0m0.004s sys 0m1.260s The "external" nfs-server has a single hard disk, so this performance is=20 OK for this config. Can you give me a hint why the perfmance is so bad when I export the fs=20 from dom0? How can i solve this? The server has no I/O jobs while this test was running so the whole=20 performance should be available. Jens