Kernel tuning for large maxsockets

Bosko Milekic bmilekic at technokratis.com
Thu Jul 17 20:56:53 PDT 2003


On Thu, Jul 17, 2003 at 08:45:29PM -0400, Scot Loach wrote:
> Bosko:
> 
> The problem I have is that each of the four pcb types has its own zone that
> is preallocated to hold maxsockets pcbs.  This is a waste of kva that could
> be better used.  Since I'm not using divert sockets or raw sockets, I would
> rather cap these zones to a small constant number, and increase the others
> as much as possible.
> 
> I should have a patch for this next week sometime.

  The kva is not pre-allocated.

  The more allocations you have for that pcb type, the more memory and
  kva space will be reserved for them.  As I said, the kva used for the
  pcbs will come out of kmem_map.  If you're allocating the pcbs, then
  you're not wasting the kva.  When you free them, the kva and memory
  stayed reserved, but this is required for type stable storage, which
  the pcbs appear to be.

-- 
Bosko Milekic  *  bmilekic at technokratis.com  *  bmilekic at FreeBSD.org
TECHNOkRATIS Consulting Services  *  http://www.technokratis.com/


More information about the freebsd-net mailing list