Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 1997 22:28:05 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        current@freebsd.org
Subject:   disk cache challenged by small block sizes
Message-ID:  <199705291228.WAA11504@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
Iozone on an ext2fs file system with the default block size of 1K on an
(ncr) SCSI Zip disk gave the following poor results:
---
iozone: No space left on device

	IOZONE: Performance Test of Sequential File I/O  --  V2.01 (10/21/94)
		By Bill Norcott

	Operating System: FreeBSD 2.x -- using fsync()

IOZONE: auto-test mode 

	MB      reclen  bytes/sec written   bytes/sec read      
	1       512     23136               118357              
	1       1024    30580               90871               
	1       2048    29635               91929               
	1       4096    28913               87154               
	1       8192    28067               44739242            
	2       512     14360               74358               
	2       1024    22153               76739               
	2       2048    21813               88417               
	2       4096    21510               97435               
	2       8192    20099               88621               
	4       512     10040               94586               
	4       1024    16093               93580               
	4       2048    15981               3862380             
	4       4096    15073               3555436             
	4       8192    17987               147776              
	8       512     9079                5237764             
	8       1024    14924               4628197             
	8       2048    12838               5506368             
Error writing block 793
---

This is probably related to slow reads from cd9660.  (For cd9660, reads
apparently aren't cached, no matter what the block size is, and reads
with a block size of 512 are apparently repeated 4 times for each 2K
fs block.  For ext2fs, the above shows that writes are sometimes cached
but another test shows that rereading flushes the cache.)

The write error is because of a leak in ext2fs - deleting files doesn't
free their space.  Apparently the block bitmap is never written to.

Iozone on an ext2fs file system with the non-default block size of 4K on
a SCSI Zip disk showed caching working correctly:
---
	IOZONE: Performance Test of Sequential File I/O  --  V2.01 (10/21/94)
		By Bill Norcott

	Operating System: FreeBSD 2.x -- using fsync()

IOZONE: auto-test mode 

	MB      reclen  bytes/sec written   bytes/sec read      
	1       512     725501              16777216            
	1       1024    745654              26843545            
	1       2048    741534              44739242            
	1       4096    741534              67108864            
	1       8192    745654              44739242            
	2       512     831069              16777216            
	2       1024    833650              26843545            
	2       2048    833650              38347922            
	2       4096    823421              53687091            
	2       8192    833650              53687091            
	4       512     887389              14128181            
	4       1024    887389              28256363            
	4       2048    887389              41297762            
	4       4096    885925              48806446            
	4       8192    887389              53687091            
	8       512     902304              13765920            
	8       1024    932877              21913098            
	8       2048    930452              28256363            
	8       4096    928039              33554432            
	8       8192    932877              35791394            
	16      512     907259              926838              
	16      1024    904203              931663              
	16      2048    900412              929646              
	16      4096    902304              929646              
	16      8192    902683              929646              
Completed series of tests
---

ufs with a block size of 4K was about the same speed as ext2fs with a block
size of 4K.  ufs with a block size of 8K was significantly (25%) slower.

Bruce



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