matt@srs.uucp (05/18/89)
Some time ago, someone posted a note describing the procedure for increasing the number of disk buffers for a machine running 3.2. Unfortunately, I don't have the name of that person handy, but perhaps that's for the best as it turns out that the method given doesn't work. Here is the relevant excerpt from the original note: On your running system: (This examples changes the value to 700.) We were running 3.2 on a Sun 4. adb -w /vmunix nbuf?W 2bc (which is 700 decimal) Now re-boot. Checked with: adb -k /vmunix /dev/mem nbuf?D (shows in decimal what this is in /vmunix) nbuf/D (shows in decimal what this is in /dev/mem) (Note: This value also shows up when you boot.) Unfortunately, it doesn't work. Although the nbuf variable does take on the intended value, the actual number of allocated buffers doesn't change. To wit: Before: using 95 buffers containing 778240 bytes of main memory After: using 592 buffers containing 778240 bytes of main memory Those are some pretty damn small buffers! Does anyone know a way to make this REALLY work (and DON'T say "yeah, upgrade to 4.0" and use the dynamic buffer allocation)? My server is sitting here with 8Mb of memory, only 3Mb of which have a chance of being used (that is the typical VIRTUAL memory usage of the server). Any help would be greatly appreciated. P.S. And why did Sun tell us, three years ago, to have lots of memory in our server? And don't tell me that our sales rep. knew about the memory usage semantics of 4.0! ----- Matt Goheen "waiting for 4.1.193" uucp: {rutgers,ames}!rochester!srs!matt internet: matt%srs.uucp@harvard.harvard.edu, matt@srs.uucp
ramsey@csvax.caltech.edu (Jim Ramsey) (05/25/89)
I had the same experience until I looked a little further. I used the following adb patch on our server to reserve 2MB worth of 8K buffers. nbuf ? W 0t256 nbuf ? D bufpages ? W 0t256 bufpages ? D (0t... is just adb's charming way of saying "in decimal") Hint: You may want to insert some commands in the makefile for your server kernel. That way you don't have to remember to do this every time you make a new kernel.
brb@uunet.uu.net (Brian Baird) (06/05/89)
> Those are some pretty damn small buffers! Does anyone know a way to make > this REALLY work (and DON'T say "yeah, upgrade to 4.0" and use the dynamic > buffer allocation)? My server is sitting here with 8Mb of memory, only > 3Mb of which have a chance of being used (that is the typical VIRTUAL > memory usage of the server). Any help would be greatly appreciated. The trick to increasing the number of buffers in SunOS 3.X (and in 4BSD systems in general) is that there are two variables: "nbuf" and "bufpages". Ordinarily both of these are 0. A zero value of nbuf means use up as many bufpages as it can. A zero value for bufpages means that bufpages takes up about 10% of memory. On a 8MB 3/280, this ends up as bufpages of 95 (8KB pages). Increasing "nbuf" will not end up doing anything unless "bufpages" is also changed. In fact, the simplest course of events is to just change "bufpages". % adb -w /vmunix bufpages?W 0t700 ^D will change vmunix to use 700 buffers (5.4MB!) on the next reboot. Brian Baird brb@myrias.uucp Myrias Research, Edmonton uunet!ubc-cs!alberta!myrias!brb