Re: How does disk caching work?
From: Jim C. Nasby (jim_at_nasby.net)
Date: 04/19/04
- Previous message: Uwe Doering: "Re: How does disk caching work?"
- In reply to: Uwe Doering: "Re: How does disk caching work?"
- Next in thread: Uwe Doering: "Re: How does disk caching work?"
- Reply: Uwe Doering: "Re: How does disk caching work?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 18 Apr 2004 21:20:43 -0500 To: Uwe Doering <gemini@geminix.org>
On Sat, Apr 17, 2004 at 09:41:19AM +0200, Uwe Doering wrote:
> The disk i/o buffers you refer to (the 'Buf' column in 'top') are the
> actual interface between the VM system and the disk device drivers. For
> file and directory data, sets of VM pages get referred by and assigned
> to disk i/o buffers. There they are dealt with by a kernel daemon
> process that does the actual synchronization between VM and disks.
> That's where the soft updates algorithm is implemented, for instance.
>
> In case of file and directory data, once the data has been written out
> to disk (if the memory pages were "dirty") the respective disk i/o
> buffer gets released immediately and can be recycled for other purposes,
> since it just referred to memory pages that continue to exist within the
> VM system.
>
> Meta data (inodes etc.) is a different matter, though. There is no VM
> representation for this, so for disk i/o they have to be cached in extra
> memory allocated for this purpose. A disk i/o buffer then refers to
> this memory range and tries to keep it around for as long as possible.
> A classical cache algorithm like LRU recycles these buffers and memory
> allocations eventually.
>
> As usual, the actual implementation is even more complex, but I think
> you got a picture of how it works.
Yes, much clearer now, thanks!
A few questions if I may...
What's a good way to tune amount of space dedicated to IO buffers?
What impact will vm_min|max_cache have on system performance? Is there
any advantage to setting it fairly high?
The machine I'm tuning is a dual Opteron box with 4G of ram, a mirror
and a 6 disk RAID10. It's running PostgreSQL.
-- Jim C. Nasby, Database Consultant jim@nasby.net Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?" _______________________________________________ freebsd-performance@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-performance To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"
- Previous message: Uwe Doering: "Re: How does disk caching work?"
- In reply to: Uwe Doering: "Re: How does disk caching work?"
- Next in thread: Uwe Doering: "Re: How does disk caching work?"
- Reply: Uwe Doering: "Re: How does disk caching work?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|