Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 1995 18:08:14 -0800
From:      chris warth <csw@artemis.com>
To:        questions@freebsd.org
Subject:   questions about 'update'
Message-ID:  <199510300208.SAA00316@scooter.artemis.com>

next in thread | raw e-mail | index | archive | help

I'm trying to see exactly how many http hits a freebsd machine
can handle and I'm seeing some strange behavior that I'm hoping
one of you can explain. 

Basically I'm soaking a machine with HTTP requests, randomly
distributed among 5000 different files so that the disk cache
eventually becomes completely saturated.  The first surprise was to see
a big dip in the hit rate every 30 seconds - like going from 100
hits per second to about 10 per second, then back up to 100 per
second.

I found the place where the 'update' frequency is set.  That's the
first question - why is it so hard to change the frequency of update?
Can I just disable it in the kernel and go back to using a specialized
process in user space?

Anyway, I played with the "update" frequency, first setting it 300
seconds.  Instead of seeing a steady 100 hits/sec then I saw a brief
initial spurt of 100 hits/sec that dropped down to a pretty steady 70
hits/second.

Thinking I was still seeing some effect of the disk cache I set the
update frequency to 90 seconds.  Then I get a regular pattern
as follows:

  t=0: 	100 hits per second, 
  t=20:	after 20 seconds the hit rate drops to 70 hits/sec,
  t=20 - t=90: steady at 70 hits/sec

  t=90: update runs and hit rate briefly drops to 10 hits/sec
  t=92: hit rate is again back up to 100/sec
  t=115: hit rate again dips to about 70 hits/sec
 	etc., etc.

I have some nifty PostScript graphs of this if anyone is interested.

So the real question is, if update is turned off, and the disk cache is
not getting flushed, what causes the hit rate to drop by 
from 100 hits/sec to 70 hits/sec after a while?

One theory is that after a while the disk cache fills up and the
system must start flushing the cache to disk.  But what is it writing
to disk?  The files have all been opened "read-only".  Is it spending
all of its time writing the last-accessed time in the inode??  If so
it seems a terrible waste and I'll want to turn that off to make a
really fast server.

Any insight would be greatly welcome.

-csw



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510300208.SAA00316>