I've got 2 machines that exchange data via NFS: 2 different files of about 20 bytes. The client writes its file and the server reads and deletes it then it writes its different file and the server reads and deletes. And so on. The 2 files have always the same names.
It was all ok. They run Linux 2.4. Nowadays, I've added another client which runs Linux 2.6. It works in the same way, it only uses files with different names.
The problem is that the new client sees the file from the server about 40 seconds after that it is written. I can wait 4-5 or even 10 seconds, but not 40.
I've tried to mount the remote partition with -o vers=2
or -o vers=3
, but with no effects.
Then I tried echo 3 > /proc/sys/vm/drop_caches
, (see NFS cache-cleaning command?) no effects.
What can I do to reduce the time gap?