Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!genrad!decvax!ima!haddock!trb From: trb@haddock.ima.isc.com (Andrew Tannenbaum) Newsgroups: comp.unix.i386 Subject: Re: Tuning information for ISC 386/ix Message-ID: <14663@haddock.ima.isc.com> Date: 20 Sep 89 23:38:04 GMT References: <38451@bu-cs.BU.EDU> Reply-To: trb@haddock.ima.isc.com (Andrew Tannenbaum) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 85 I am speaking as a hacker employed by ISC, not as ISC tech support or as an official spokesman of ISC. I thought this might be of general use so I am posting it instead of mailing directly to madd@std.com. No guarantees expressed or implied. In article <38451@bu-cs.BU.EDU> madd@std.com writes: > If some kind soul could send me an mtune file that works reasonably > well (considering) for a system with 4mb memory, ethernet, and x11 (a > heavy STREAMS user), I would be very grateful. Additionally, I will > be upgrading to 8mb and putting NFS on the thing, so any tuning > information for such a system would also be useful. I believe that you are right in guessing that the tunable parameters need to be fiddled. Until these data structures are properly tuned, your system will fail in strange ways as you've described. The mtune file is a master file, which you shouldn't touch. The one that you change is the stune file (these files are in /etc/conf/cf.d in 386/ix 2.0). The way to do this is to run netstat -m, and you'll get some output like this: These numbers are off my machine; I arrived at the alloc values by trial and error. If a number is 1024, it probably means that I tried it with 512 and it maxed out and failed. I run X11 and ethernet but no NFS on this 9Mb 386. $ netstat -m alloc inuse total max fail streams: 128 52 840 58 0 queues: 512 290 5016 326 0 mblocks: 2840 251 384394 316 0 dblocks: 2272 251 304876 306 0 dblock class: 0 ( 4) 32 0 25655 3 0 1 ( 16) 256 62 42923 73 0 2 ( 64) 512 27 219359 44 0 3 ( 128) 1024 162 9671 189 0 4 ( 256) 256 0 5800 15 0 5 ( 512) 64 0 746 2 0 6 (1024) 64 0 389 2 0 7 (2048) 32 0 306 9 0 8 (4096) 32 0 27 2 0 The numbers in the alloc column are out of your stune file. If there are any non-zero numbers in the fail column, recompile your kernel after fiddling the stune numbers by running idtune, or by running kconfig (which runs idtune) using the menu options 1) CONFIGURE KERNEL and 6) ADD TUNABLE PARAMETERS. If you want to change the 128 byte dblocks, the parameter is NBLK128, and so on. Use kconfig to do this, it's easy to break if you do it by hand. The kconfig process copies files from cf.d to kconfig.d, and it will happily overwrite a file you've edited by hand if you play in the wrong place. Experiment with kconfig and understand it before you try to subvert it. The method for modifying tunable kernel parameters is well-described in the 386/ix Operations/System Adminstration Guide, Chapter 5, "Customizing your Computer" - I have a perfect-bound 6x9 copy with ISC covers, I think this is an AT&T document, so other versions may exist. Here's my stune file, in case it might help: NINODE 300 NS5INODE 300 NFILE 300 NBUF 250 NPROC 100 MAXUP 60 NCLIST 120 NSTREAM 128 NQUEUE 512 NBLK4096 32 NBLK2048 32 NBLK1024 64 NBLK512 64 NBLK256 256 NBLK128 1024 NBLK64 512 NBLK16 256 NBLK4 32 SHLBMAX 8 NOFILES 64 Andrew Tannenbaum Interactive Cambridge, MA +1 617 661 7474