On Mon, Aug 14, 2023 at 02:00:49PM +1000, Paul Ripke wrote: > I recently upgraded my netbsd-9 amd64 w 16GiB RAM to netbsd-10. Which, btw, > feels much "snappier", anecdotally. > After running a few builds and whatnot, I chased down where all my RAM was > going. Manually sorted: > > Memory resource pool statistics > Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg > Idle > buf2k 2048 399771 0 97706 164994 11676 153318 164983 0 inf > 106 > vcachepl 640 1412222 0 612635 183127 39581 143546 183127 0 inf > 0 > ffsino 280 1440870 0 641796 78452 14088 64364 78452 0 inf > 0 > ffsdino2 264 1445733 0 646660 73222 13218 60004 73222 0 inf > 0 > namecache 192 1257514 0 444866 39817 2 39815 39817 0 inf > 0 > buf16k 16896 177282 0 71409 35542 250 35292 35292 0 inf > 1 > bufpl 280 425741 0 12096 30334 490 29844 30334 0 inf > 0 > anonpl 40 4816174 0 3570206 24466 2 24464 24466 0 inf > 0 > rwlock 64 1649569 0 753596 18923 2298 16625 18923 0 inf > 0 > mutex 64 1337583 0 537463 17451 1218 16233 17451 0 inf > 0 > dirhashblk 2048 30827 0 2014 15238 732 14506 15238 0 inf > 64 > radixnode 192 393557 0 273821 10589 1303 9286 10589 0 inf > 12 > pvpage 4096 14790 0 7333 10066 2131 7935 8964 0 inf > 478 > kmem-01024 1088 39226 0 20445 9647 3150 6497 8117 0 inf > 0 > vmmpepl 192 213489 0 122047 6626 1562 5064 5625 0 inf > 10 > kmem-02048 2048 22881 0 12785 8394 3346 5048 6698 0 inf > 0 > mclpl 2048 33126 0 24568 5514 1211 4303 4390 0 261333 > 24 > buf4k 4096 7619 0 4102 3884 366 3518 3838 0 inf > 1 > phpool-64 64 215806 0 22397 3283 64 3219 3283 0 inf > 4 > mbpl 520 76469 0 58519 3265 520 2745 2795 0 inf > 2 > ... > Totals 177503409 0 169479744 816744 149009 667735 > > In use 4025485K, total allocated 4834772K; utilization 83.3% > > That seems a little excessive, to my eye? Is this "normal"? Having >1/4 of RAM > apparently used mostly for file metadata, if I'm reading this correctly? I > don't recall the usage under -9, unfortunately, but I also never had a reason > to look. > > I do set 'kern.maxfiles=40960', and also tweak 'vm.{anon,file}{min,max}', but, > afaict, nothing else relevant. > > fwiw, this is a single raid0 over a couple of wd, all ffsv2, no zfs. > > Actually, looking again... this is my only system with such a large > buf2k... what commonly allocates from that pool?
Following up, I see buf2k allocated when I run 'git status' under netbsd/pkgsrc, netbsd/src, etc repos. I also see growth during /etc/daily. The filesystem is ffsv2 with log, on raidframe raid1 of wd[01]a. -- Paul Ripke "Great minds discuss ideas, average minds discuss events, small minds discuss people." -- Disputed: Often attributed to Eleanor Roosevelt. 1948.