Skip to contentSkip to conversation

user defined cache

DISCUSSION Warwick Boote 3 participants 3 messages Jul 4, 2008

lore
Share & tools
lore
#0 lore raw

Hi all,

Do you know of setting or layered file system that enables me to define a large buffer in main memory and cache writes to this buffer?

Obviously i'd need the file system to also read from this buffer if the data hasn't been flushed to the disk yet.

Waz.
=)

(apologies for inappropriate disclaimer)

--

This email is from Civica Pty Limited and it, together with any attachments, is confidential to the intended recipient(s) and the contents may be legally privileged or contain proprietary and private information. It is intended solely for the person to whom it is addressed. If you are not an intended recipient, you may not review, copy or distribute this email. If received in error, please notify the sender and delete the message from your system immediately. Any views or opinions expressed in this email and any files transmitted with it are those of the author only and may not necessarily reflect the views of Civica and do not create any legally binding rights or obligations whatsoever. Unless otherwise pre-agreed by exchange of hard copy documents signed by duly authorised representatives, contracts may not be concluded on behalf of Civica by email. Please note that neither Civica nor the sender accepts any responsibility for any viruses and it is your responsibility to scan the email and the attachments (if any). All email received and sent by Civica may be monitored to protect the business interests of Civica.

#1 lore raw
Quoted 10 lines · Warwick Boote

Hi all,

Do you know of setting or layered file system that enables me to define
a large buffer in main memory and cache writes to this buffer?

Obviously i'd need the file system to also read from this buffer if the
data hasn't been flushed to the disk yet.

XFS supports the following mount options, and they do increase throughput somewhat on my system:

logbufs=N (helps concurrency)
logbsize=N (helps log buffering)

If you are using an internal XFS log, you may also try "nobarrier" to reduce force-to-disk write frequency.
NB: I have seen this option discussed on this mailing list, but I do not see it in the mount(8) man page.

Bear in mind that the XFS log is for metadata, rather than actual file data. This may be what you're looking for, or at least sufficient; if not, my apologies.

Signature · 5 lines
Mark

"What better place to find oneself than
 on the streets of one's home village?"
      --Capt. Jean-Luc Picard, "Family"
#2 lore raw
In reply to Warwick Boote
Quoted 4 lines · Warwick Boote

Hi all,

Do you know of setting or layered file system that enables me to define a large buffer in main memory and cache writes to this buffer?

I know there's wrapper libraries that do this - like FFIO - but I don't think there's a free one.

However, why doesn't the page cache do what you want already?

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]