All of lore.kernel.org
 help / color / mirror / Atom feed
* Caching
@ 2002-03-28 11:39 Matt Heaton
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Heaton @ 2002-03-28 11:39 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

I have an NFS server that is 99% reads and 1% writes.   When I do writes the NFS server (Or maybe the client) seems to cache files so that when a
write occurs my NFS clients don't get the updated files for a while.  Is there some way to expire the cache whenever a write occurs for a specific
file?  I want the cache to be in place as 99% of all NFS service is reads on my network, I just want updates available right away for the writes?  Any
clues?  I am running 2.4.18 with NFS_ALL patch compiled in on the clients, and 2.4.18 (No patch) for the server.

Thanks,
Matt


[-- Attachment #2: Type: text/html, Size: 1180 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Caching
@ 2002-03-29 20:48 Lever, Charles
  0 siblings, 0 replies; 3+ messages in thread
From: Lever, Charles @ 2002-03-29 20:48 UTC (permalink / raw)
  To: 'Matt Heaton'; +Cc: nfs

[-- Attachment #1: Type: text/plain, Size: 975 bytes --]

hi matt-
 
fsync() or close() will push the writes to the server immediately.  you can
also mount
the file system with the "sync" option to cause all write operations to push
the data
to the server before returning to your application.

-----Original Message-----
From: Matt Heaton [mailto:admin@0catch.com]
Sent: Friday, March 29, 2002 6:39 AM
To: nfs@lists.sourceforge.net
Subject: [NFS] Caching


I have an NFS server that is 99% reads and 1% writes.   When I do writes the
NFS server (Or maybe the client) seems to cache files so that when a
write occurs my NFS clients don't get the updated files for a while.  Is
there some way to expire the cache whenever a write occurs for a specific
file?  I want the cache to be in place as 99% of all NFS service is reads on
my network, I just want updates available right away for the writes?  Any
clues?  I am running 2.4.18 with NFS_ALL patch compiled in on the clients,
and 2.4.18 (No patch) for the server.
 
Thanks,
Matt
 


[-- Attachment #2: Type: text/html, Size: 2442 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Caching.
@ 2004-08-06 10:06 Rogier Wolff
  0 siblings, 0 replies; 3+ messages in thread
From: Rogier Wolff @ 2004-08-06 10:06 UTC (permalink / raw)
  To: linux-kernel


On our server we run: 

Linux version 2.4.25-rmap-nonapi (root@obelix) (gcc version 2.95.4
  20011002 (Debian prerelease)) #1 SMP Tue Jun 15 13:35:04 CEST 2004

I have this file: 

 249412 -rw-rw-r--    2 wolff    hdr      1073741824 Aug  5 15:21 disk.img3

which takes some 250Mb on disk, but is 1Gb in size. It's sparse. 

When I repeatedly GREP trhough this file, I see large amounts of the
file being reread from disk every time, even though the machine easily
has enough memory to cache the whole 250Mb of diskblocks that the file
compromises.

The server has 1Gb of memory. 

To be sure the memory was free, I created a 900Mb application that
would run-and-touch all it's memory. Killing that would leave the
machine with "900Mb free" (actualy just over 908000 kb). Then running
the multiple searches would still page in about half the pages that
should have been cached.

Even when the file on disk only takes about 1Mb of disk space, still
500 of the 1000 kbytes of data on the disk was read every time through
the loop.

My "task at hand" will be done by the time anybody reads this, but
kernel-memory managing could be better, and someone might want to take
a look what's going on.

	Roger. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
**** "Linux is like a wigwam -  no windows, no gates, apache inside!" ****

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-06 10:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-06 10:06 Caching Rogier Wolff
  -- strict thread matches above, loose matches on Subject: below --
2002-03-29 20:48 Caching Lever, Charles
2002-03-28 11:39 Caching Matt Heaton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.