Dear NFS developers

I'm not sure exactly where the problem is, but the libc maintainers
say it's not in their code.  Can anyone shed any light on the
problem described below ?

Many thanks

Ian Thurlbeck

-----

[1.] One line summary of the problem:
Multiple fseek/fwrite's *very* slow to Solaris 2.6 NFS server

[2.] Full description of the problem/report:
Writing a small (11K) file in 8 byte chunks but updating a
header at the start of the file at each write takes 21.5 seconds.
Same program takes << 1 second on Solaris/Digital UNIX to same
NFS server.

[3.] Keywords (i.e., modules, networking, kernel):
NFS fseek fwrite slow

[4.] Kernel version (from /proc/version):
Linux version 2.2.0-pre5-ac1 (root@ida) (gcc version egcs-2.91.60 19981201 (egcs-1.1.1 
release)) #3 Thu Jan 7 11:23:49 GMT 1999

[5.] Output of Oops.. message (if applicable) with symbolic information
     resolved (see Documentation/oops-tracing.txt)
[6.] A small shell script or example program which triggers the
     problem (if possible)
------cut----------
#include <stdio.h>

int NoCols;
FILE *f;

void
WriteElement(int Row, int Col, double value)
{
        int offset;

        offset=(Col+(Row-1)*NoCols)*sizeof(double);

        /* go to start of file and update file size records
        * This is just a test program writing junk */
        fseek(f,0,0);
        fwrite(&value,sizeof(double),1,f);

        /* go to requested position and write data */
        fseek(f,offset,0);
        fwrite(&value,sizeof(double),1,f);
}


main()
{
        int i, j, rows=350, cols=4;

        f=fopen("test2.mx", "w+");

        NoCols=cols;
        for (i=1; i<=rows; i++) {
                if ((i-1)%100 == 0) printf("Row %d\n", i);
                for (j=1; j<=cols; j++)
                        WriteElement(i,j,2.3);
        }
        fclose(f);
}
---------cut---------
[7.] Environment
Linux Redhat Intel 5.2 / 3Com Vortex Ethernet

[7.1.] Software (add the output of the ver_linux script here)
Linux ida 2.2.0-pre5-ac1 #3 Thu Jan 7 11:23:49 GMT 1999 i586 unknown
Kernel modules         found
Gnu C                  egcs-2.91.60
Binutils               2.9.1.0.15
Linux C Library        2.0.7
Dynamic linker         ldd (GNU libc) 2.0.7
Linux C++ Library      2.8.0
Procps                 1.2.9
Mount                  2.8a
Net-tools              (1998-06-29)
Kbd                    0.96
Sh-utils               1.16

[7.2.] Processor information (from /proc/cpuinfo):
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 5
model           : 2
model name      : Pentium 75 - 200
stepping        : 12
cpu MHz         : 133.640829
fdiv_bug        : no
hlt_bug         : no
sep_bug         : no
f00f_bug        : yes
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8
bogomips        : 53.25

[7.3.] Module information (from /proc/modules):
[7.4.] SCSI information (from /proc/scsi/scsi)
[7.5.] Other information that might be relevant to the problem
       (please look in /proc and include all information that you
       think to be relevant):
[X.] Other notes, patches, fixes, workarounds:  
The same problem occurs with kernel 2.0.35/36.  Writing to a local
disk runs at full speed.

--
Ian Thurlbeck                http://www.stams.strath.ac.uk/
Statistics and Modelling Science, University of Strathclyde
Livingstone Tower, 26 Richmond Street, Glasgow, UK,  G1 1XH
Tel: +44 (0)141 548 3667           Fax: +44 (0)141 552 2079
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to