freebsd kernel with SKQ
Go to file
Matthew Dillon 1b7e3dafdf Fix a file-rewrite performance case for UFS[2]. When rewriting portions
of a file in chunks that are less then the filesystem block size, if the
data is not already cached the system will perform a read-before-write.
The problem is that it does this on a block-by-block basis, breaking up the
I/Os and making clustering impossible for the writes.  Programs such
as INN using cyclic file buffers suffer greatly.  This problem is only going
to get worse as we use larger and larger filesystem block sizes.

The solution is to extend the sequential heuristic so UFS[2] can perform
a far larger read and readahead when dealing with this case.

(note: maximum disk write bandwidth is 27MB/sec thru filesystem)
(note: filesystem blocksize in test is 8K (1K frag))
dd if=/dev/zero of=test.dat bs=1k count=2m conv=notrunc

Before:  (note half of these are reads)
      tty             da0              da1             acd0             cpu
 tin tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
   0   76 14.21 598  8.30   0.00   0  0.00   0.00   0  0.00   0  0  7  1 92
   0   76 14.09 813 11.19   0.00   0  0.00   0.00   0  0.00   0  0  9  5 86
   0   76 14.28 821 11.45   0.00   0  0.00   0.00   0  0.00   0  0  8  1 91

After:	(note half of these are reads)
      tty             da0              da1             acd0             cpu
 tin tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
   0   76 63.62 434 26.99   0.00   0  0.00   0.00   0  0.00   0  0 18  1 80
   0   76 63.58 424 26.30   0.00   0  0.00   0.00   0  0.00   0  0 17  2 82
   0   76 63.82 438 27.32   0.00   0  0.00   0.00   0  0.00   1  0 19  2 79

Reviewed by:	mckusick
Approved by:	re
X-MFC after:	immediately (was heavily tested in -stable for 4 months)
2002-10-18 22:52:41 +00:00
bin Staticify for lint. 2002-10-18 14:48:48 +00:00
contrib Disable SGR support in grotty(1) pending the resolution on -arch. 2002-10-18 09:10:44 +00:00
crypto Permit the argument to the -s option to be a hostname. I see no 2002-10-02 00:27:14 +00:00
etc Install the include files in sys/dev/ofw. 2002-10-18 15:30:50 +00:00
games Last commit was slightly hasty: #include <string.h> is required on 2002-10-09 20:42:40 +00:00
gnu Revert last delta. SGR support in grotty(1) is disabled system-wide 2002-10-18 09:14:17 +00:00
include Install the include files in sys/dev/ofw. 2002-10-18 15:30:50 +00:00
kerberos5 Build kerberized versions of the PAM library, and install them 2002-10-11 14:17:09 +00:00
kerberosIV Remove programs that no longer need a kerberisation option. 2002-10-16 16:12:22 +00:00
lib Oops. Also provide a lint-compatible unused argument warning killer. 2002-10-18 16:24:20 +00:00
libexec Don't call report() without a format string. 2002-10-13 11:27:36 +00:00
release Modified release note: New commands for lpc(1). 2002-10-18 19:54:52 +00:00
sbin Typo in verb: zeros -> zeroes. 2002-10-18 01:05:46 +00:00
secure Don't lint contrib'ed sources, even if the builder has asked for linting. 2002-09-25 09:58:00 +00:00
share Revert last delta. SGR support in grotty(1) is disabled system-wide 2002-10-18 09:14:17 +00:00
sys Fix a file-rewrite performance case for UFS[2]. When rewriting portions 2002-10-18 22:52:41 +00:00
tools Fix a bug that showed up when trying to produce a database for 2002-10-17 16:29:26 +00:00
usr.bin Revert last delta. SGR support in grotty(1) is disabled system-wide 2002-10-18 09:14:17 +00:00
usr.sbin * Add CDRIOC{READ,WRITE}SPEED ioctls to cd(4). Units are in KB/sec. 2002-10-18 22:03:39 +00:00
COPYRIGHT
MAINTAINERS Add myself as da(4) maintainer. This is mostly so I can review and commit 2002-10-18 18:27:56 +00:00
Makefile PC98 is not a true architecture, but a subarchitecture of i386, so we need 2002-10-02 13:52:36 +00:00
Makefile.inc1 Initiate deorbit burn for the i386-only a.out related support. Moves are 2002-09-17 01:49:00 +00:00
Makefile.upgrade Removed "env" commands. "sh" is a real shell, so 2002-03-19 05:58:36 +00:00
README Fix broken handbook links. 2002-07-21 16:45:30 +00:00
UPDATING gcc 3.2 2002-09-03 06:13:43 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

kerberosIV	KerberosIV (eBones) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html