Date: Mon, 3 Apr 2000 02:55:56 +0200 From: "Marinos J . Yannikos" <mjy@pobox.com> To: questions@freebsd.org Subject: tuning the vm system / disk cache Message-ID: <20000403025556.S31173@TK147108.telekabel.at>
next in thread | raw e-mail | index | archive | help
I'm trying to reduce the number of disk accesses during database queries - the database is very small, there's plenty of RAM available, and the queries are simple SELECT queries (i.e. read-only). I am using the following kernel options: maxusers 256 options SOFTUPDATES options SHMMAXPGS=65536 options SHMSEG=32 (the last 2 because I'm using postgres) The whole database takes up approx. 12MB disk space, the system looks like this: Mem: 26M Active, 13M Inact, 25M Wired, 36K Cache, 12M Buf, 438M Free Swap: 490M Total, 490M Free The filesystem used is mounted with -o async (not that it should matter - except perhaps for the logfiles, which only grow by a few 100 bytes per second anyway). Still, the disk seems to be accessed frequently during the queries: k7# iostat 5 tty ad0 acd0 fd0 cpu tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id 1 88 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 51 0 4 0 45 0 15 96.26 9 0.86 0.00 0 0.00 0.00 0 0.00 86 0 7 0 6 0 15 95.46 14 1.32 0.00 0 0.00 0.00 0 0.00 78 0 6 0 16 0 15 85.39 12 1.02 0.00 0 0.00 0.00 0 0.00 85 0 6 0 9 0 15 100.55 13 1.31 0.00 0 0.00 0.00 0 0.00 79 0 5 0 16 0 16 97.71 12 1.18 0.00 0 0.00 0.00 0 0.00 83 0 5 0 12 0 15 106.29 10 0.99 0.00 0 0.00 0.00 0 0.00 80 0 8 0 12 0 16 100.16 18 1.72 0.00 0 0.00 0.00 0 0.00 77 0 5 0 18 Is there any way to force a more aggressive caching by the vm system? I have looked at the sysctl variables, but my attempts at tuning them weren't very successful. Any input would be much appreciated. -mjy -- ***==> Marinos J. Yannikos <mjy@pobox.com> ***==> http://pobox.com/~mjy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000403025556.S31173>