Problem with NFS file caching after 'fsync'

Problem with NFS file caching after 'fsync'

Post by Stuart Ramsde » Sat, 10 Feb 1996 04:00:00



Hi there,

We are using a shared file across a distributed network for
process scheduling. It appears that after the file is locked,
read, modified, written to, fsynced and then unlocked, there
is a small delay of 1second during which any read occuring
from another machine will get the old file before modification.

This sort of defeats the purpose of the file lock and I thought
that 'fsync'ing would flush any NFS caches before it returned.

Does anyone know why the cache would be persisting for that
long? We are doing this under Irix5.3 on Indys on a standard
NFS filesystem (No CacheFS and no Automounting).

Is there a workaround for this (apart from putting an inherent
delay into the filesharing protocol?)

Thanks,

Stuart.

--

 Lecturer in Computer Animation,
 Australian Centre for the Arts and Technology (ACAT), Institute of the
Arts
 Australian National University, Canberra, ACT, Australia.

 
 
 

Problem with NFS file caching after 'fsync'

Post by Stefan Monnie » Sat, 10 Feb 1996 04:00:00




] This sort of defeats the purpose of the file lock and I thought
] that 'fsync'ing would flush any NFS caches before it returned.

Are you sure the problem resides on the writer-side ?
Normally, the fsync should flush everything to the server, but another client
might not be notified of the change and might still use its stale copy in its
cache (if it has such a stale copy).

NFS's consistency guarantees are very weak. If you need something better, you
want to look into Sprite or AFS, but since these aren't simple free drop-in
replacements, maybe the solution to your problem is NFS3 (I don't know exactly
what kind of consistency it guarantees, but I hear it's noticeably better than
NFS2 (while allowing (more) caching on the writer-side))

        Stefan

 
 
 

1. 'primary i-cache: !?!Syndrome'???

Hi SGI,

what does the following message I picked up from /usr/adm/SYSLOG
mean ?

Dec 11 13:19:25 2A:zonk unix:     ERROR MSG:  No ecc data error found in primary cacheline
Dec 11 13:19:25 2A:zonk unix:     primary i-cache: |?!Syndrome at addr 0xafee868 normal!
Dec 11 13:19:25 2A:zonk unix:     ERROR MSG:  No ecc data error found in primary cacheline
Dec 11 13:19:25 2A:zonk unix:     primary i-cache: |?!Syndrome at addr 0x83ee868 normal!

The machine is an Indy with R4600PC, running IRIX 5.2:

1 100 MHZ IP22 Processor
FPU: MIPS R4610 Floating Point Chip Revision: 0.0
CPU: MIPS R4600 Processor Chip Revision: 1.0
On-board serial ports: 2
On-board bi-directional parallel port
Data cache size: 16 Kbytes
Instruction cache size: 16 Kbytes
Main memory size: 64 Mbytes
etc..

Is there anything wrong with the hardware ?

Thanks,


------------------------------------------------------------------------
Andres Kruse      | NIKHEF - National Institute for Nuclear Physics and

------------------------------------------------------------------------

2. inlining

3. Any way to get fx's 'label/show/part' 'off-line'?

4. Windows 2000 Networking

5. HELP 'Stale NFS handle'

6. attribute changes/globally

7. 'logical volumes' on NFS mounted resources?

8. Where does ProDOS come from?

9. 'object is remote' error when nfs mounting

10. some NFS mounted directories are 'invisible'??

11. NFS, NIS, but some user's still can't log on

12. starting 'cvd file' with options

13. File format for demo program 'drive' ?