[comp.unix.wizards] Write-behind statistics wanted.

jack@cwi.nl (Jack Jansen) (01/12/89)

Does anyone happen to have statistics around of the number of
blocks that are written to disk that belong to files that have
been removed already?

This came up as a side-issue in a conversation today, and I was
just wondering how much I/O bandwidth unix is spending on flushing
deleted temporary files to disk.

All facts, pointers and hunches welcome...
-- 
--
Fight war, not wars			| Jack Jansen, jack@cwi.nl
Destroy power, not people! -- Crass	| (or mcvax!jack)

edler@cmcl2.NYU.EDU (Jan Edler) (01/13/89)

In article <7819@boring.cwi.nl> jack@cwi.nl (Jack Jansen) writes:
>Does anyone happen to have statistics around of the number of
>blocks that are written to disk that belong to files that have
>been removed already?

This topic came up once before, but I don't have a copy of my response
at that time.  This should be similar.

We optimize these away on our Ultracomputer prototypes.  We use the V7
filesystem with ordered writes and a 2KB blocksize.  We've configured
128 buffers into the system, and on a recent 3-day period, collected
the following data:

	number of buffer cache lookups:		1996814
	number of hits:				1722425 (86% hit rate)
	number of actual fs disk reads:		222451
	number of actual fs disk writes:	123421

	number of disk blocks freed:		56164
	number of those still in cache:		23188 (41%)
	number of those marked delayed write:	6639  (12% overall)

I don't know how typical our workload is, and this is just one data
point, but there it is.  12% of our disk blocks freed might have been
needlessly written to disk without our optimization, adding 1% to our
overall filesystem disk I/O rate.  Of course, some of them might have
been re-allocated and re-referenced again before being written to disk
anyway, but we do a sync every 45 seconds.

You decide how worthwhile it all is.

Jan Edler
NYU Ultracomputer Project
edler@nyu.edu
(212) 998-3353