Re: NFS client performance 1.5 orders of magnitude too slow?

Thierry Danis (danis@sagem.fr)
Tue, 9 Mar 1999 09:43:23 +0100 (MET)


>
>
> Hi,
>
> I have heard that the Linux NFS client doesn't have the best reputation.
> However, I really couldn't believe the following results I got.
> The following program writes 8,192 bytes, 1 byte at a time.
>
> #include <fcntl.h>
>
> void main(int ac, char *av[])
> {
> int fd = open(av[1], O_WRONLY|O_CREAT, 0777);
> int i;
>
> for (i = 0; i < 8192; i++) {
> write(fd, "0", 1);
> }
> close(fd);
> }
>
> >From two machines with an identical LAN network connection to a SunOS 5.6
> server, the program finishes instantaneously on a FreeBSD 3.0 machine:
>
> time ./tw.f3 A1
> 0.008u 0.091s 0:00.10 90.0% 5+176k 0+1io 1pf+0w
>
> On a Linux 2.2.3/RH 5.2 machine, however, it takes
>
> time ./tw.linux B1
> 0.000u 0.840s 0:51.16 1.6% 0+0k 0+0io 64pf+0w
>
> 51 seconds!
>
[...]
>
> - Godmar
>

I just tried your test. It is almost instantenous, whether
the server is a Linux 2.2.1-ac3 box or a Solaris 2.5.1 :

/soleil/u7/danis/tmp > time ./bench-nfs toto
0.01user 0.04system 0:00.05elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (61major+9minor)pagefaults 0swaps
/soleil/u7/danis/tmp > ls -l toto
-rwxrwxr-x 1 danis sig 8192 mar 9 09:39 toto
/soleil/u7/danis/tmp >

The client is a 2.2.2-ac7.

With a 2.0.34 box :

/soleil/u7/danis/tmp > time ./zz toto
0.02user 1.07system 0:14.06elapsed 7%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (53major+7minor)pagefaults 0swaps
/soleil/u7/danis/tmp >

That is, 14 secondes.

A+

-- 
	Thierry Danis

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/