Hi folks
I'm having a performance problem with writing to file on a networked drive. Writing out a biggish (4001x4001) array to file, it's taking over half an hour going to shared storage on a NAS box. Going to a local HDD, it takes about 37 seconds. (File size about 150MB.)
It's not network speed. We use gigabit networking and copying the file from local disk to NAS box takes about 4 seconds.
It's not the fact that the NAS box isn't running Windows. The same test done to a genuine Windows share on another PC came in only very slightly faster.
Both the file opening and the write are buried in fairly large libraries, but the operative bits of code are nothing unusual:
OPEN(IFILE,FILE=NAMEF,STATUS='NEW',
& ACTION='WRITE',ERR=10,IOSTAT=IERROR)
...
DO J = MINROW,NZROW
WRITE(IFILE,'(6(F0.3,'' ''))',ERR=9000)
& (ZMAT(I,J),I=MINCOL,NZCOL)
END DO
The compile options are likewise nothing special. Libraries are built with -mklib but otherwise all compile options are as default. I use -undef and -check during testing, but these timings were obtained with those switched off. The big array is in a common block but passed to the library routine that does the writing as an argument. Linking is done with virtualcommon.
However, there is nothing fundamentally wrong with performance as the timing to a local drive demonstrates. The issue is network performance. Test code written in VB.NET and Perl doesn't have this performance issue, which suggests there isn't anything much wrong with my network connection.
From what I can observe of the behaviour, I believe there is a lot of unnecessarily frequent flushing to disk going on writing to the NAS box. Can anyone offer any ideas if this diagnosis makes sense and, if so, what to do about it? Any useful compile options I should be using? Any cunning wheezes about opening files?
(For completeness FTN95 V5.50; compiling and linking on WinXP 32 Pro; also testing on Vista 64 and Win7 64; no 3rd party libraries involved - only stuff I've written and compiled myself.)
Thanks
Ian[/code]