This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libf2c/16970] long write times via NFS


------- Additional Comments From e-frx at arnone dot de dot unifi dot it  2004-08-12 09:22 -------
I also noted that this NFS-performance killer behaviour shows up *only* with
unformatted files. If the program is modified so that the output file is a
formatted (text) file, the writing time drops to a reasonable value, despite the
output file higher size (about 26 Mbyte, rather than 13 Mbyte).

$ df --si .
Filesystem             Size   Used  Avail Use% Mounted on
192.168.0.10:/home10b
                       79GB  550MB   75GB   1% /home10b
$ cat mywrite2.f 
      program mywrite2

c     constant definitions
c     """"""""""""""""""""
      integer n
      parameter (n=800000)

c     variable declarations
c     """""""""""""""""""""
      integer i
      complex cvar

c     write out unformatted file
c     """"""""""""""""""""""""""
      open (unit=3,file='myout2.dat',form='formatted')
      close(unit=3,status='delete')
      open (unit=3,file='myout2.dat',form='formatted')
      rewind 3

      cvar = (1.23e20,0.31e20)

      write (3,*) n
      do 10 i = 1, n
        cvar = cvar/1.1
        write (3,*) cvar
 10   continue

      close (unit=3)

      stop
      end
$ g77 -static -o mywrite2 mywrite2.f
$ \time -o nfstime2 ./mywrite2
$ cat nfstime2 
4.50user 0.17system 0:05.25elapsed 88%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (50major+17minor)pagefaults 0swaps


That's fairly similar to the time I can get on the local filesystem:

$ df --si .
Filesystem             Size   Used  Avail Use% Mounted on
/dev/cciss/c0d0p2     139GB  8.6GB  123GB   7% /
$ \time -o localtime2 ./mywrite2
$ cat localtime2
4.47user 0.30system 0:05.23elapsed 91%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (50major+17minor)pagefaults 0swaps

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16970


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]