On Sat, Nov 10, 2012 at 11:18 AM, Andre Oppermann <an...@freebsd.org> wrote: > On 10.11.2012 19:04, Peter Wemm wrote: >> >> On Sat, Nov 10, 2012 at 9:48 AM, Eitan Adler <ead...@freebsd.org> wrote: >>> >>> On 10 November 2012 12:45, Peter Wemm <pe...@wemm.org> wrote: >>>> >>>> On Sat, Nov 10, 2012 at 9:33 AM, Eitan Adler <ead...@freebsd.org> wrote: >>>>> >>>>> On 10 November 2012 12:04, Alfred Perlstein <bri...@mu.org> wrote: >>>>>> >>>>>> Sure, if you'd like you can help me craft that comment now? >>>>> >>>>> >>>>> I think this is short and clear: >>>>> === >>>>> Limit the amount of kernel address space used to a fixed cap. >>>>> 384 is an arbitrarily chosen value that leaves 270 MB of KVA available >>>>> of the 2 MB total. On systems with large amount of memory reduce the >>>>> the slope of the function in order to avoiding exhausting KVA. >>>>> === >>>> >>>> >>>> That's actually completely 100% incorrect... >>> >>> >>> okay. I'm going by the log messages posted so far. I have no idea how >>> this works. Can you explain it better? >> >> >> That's exactly my point.. >> >> You get 1 maxuser per 2MB of physical ram. >> If you get more than 384 maxusers (ie: 192GB of ram) we scale it >> differently for the part past 192GB. I have no idea how the hell to > > > Rather past 768MB of RAM.
You're right. It is 768M ram before the slope of the cap changes. maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); This is simple math. physpages is units of pages. (2 * 1024 * 1024 / PAGE_SIZE) = 2MB, converted to pages. So maxusers = 1 per 2MB of physical ram. 20MB of ram calculates maxusers = 10. 768M ram gives maxusers = 384. Above 768M, one maxuser is allocated per 2 * 8 = 16MB of ram. 4G gives maxusers = 592. 16G gives maxusers = 1360. >> calculate that. >> You get an unlimited number of regular mbufs. >> You get 64 clusters per maxuser (128k) >> Unless I fubared the numbers, this currently works out to be 6%, or 1/16. >> >> Each MD backend gets to provide a cap for maxusers, which is in units >> of 2MB. For an i386 PAE machine you have a finite amount of KVA space >> (1GB, but this is adjustable.. you can easily configure it for 3GB kva >> with one compile option for the kernel). The backends where the >> nmbclusters comes out of KVA should calculate the number of 2MB units >> to avoid running out of KVA. >> >> amd64 does a mixture of direct map and kva allocations. eg: mbufs and >> clusters come from direct map, the jumbo clusters come from kva. I'm aware of this. Behavior of how to set a "Don't die" exhaustion is MD. -- Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"