Re: global mbuf memory limit

2017-01-24 Thread Claudio Jeker
On Tue, Jan 24, 2017 at 03:26:42PM +0100, Alexander Bluhm wrote: > On Tue, Jan 24, 2017 at 05:46:31PM +1000, David Gwynne wrote: > > > Apart from the problem that I don't know wether the mutex kills > > > performance, the diff looks good. > > > > the tests ive done and simon mages has done show a

Re: global mbuf memory limit

2017-01-24 Thread Alexander Bluhm
On Tue, Jan 24, 2017 at 05:46:31PM +1000, David Gwynne wrote: > > Apart from the problem that I don't know wether the mutex kills > > performance, the diff looks good. > > the tests ive done and simon mages has done show a slight benefit. > id expect to see that grow as we use pools more concurren

Re: global mbuf memory limit

2017-01-23 Thread David Gwynne
On Tue, Jan 24, 2017 at 02:55:50AM +0100, Alexander Bluhm wrote: > On Wed, Dec 14, 2016 at 03:52:32PM +1000, David Gwynne wrote: > > > Wouldn't it make sense to use atomic operations to keep track of the > > > amount of memory that was allocated? > > > > the mtx may be slow, but it is a slow path

Re: global mbuf memory limit

2017-01-23 Thread Alexander Bluhm
On Wed, Dec 14, 2016 at 03:52:32PM +1000, David Gwynne wrote: > > Wouldn't it make sense to use atomic operations to keep track of the > > amount of memory that was allocated? > > the mtx may be slow, but it is a slow path id like to keep simple. Is allocate and free of mbuf clusters in the slow

Re: global mbuf memory limit

2016-12-13 Thread David Gwynne
> On 22 Nov 2016, at 21:20, Mark Kettenis wrote: > >> Date: Tue, 22 Nov 2016 12:42:39 +1000 >> From: David Gwynne >> >> right now pools that make up mbufs are each limited individually. >> >> the following diff instead has the mbuf layer have a global limit >> on the amount of memory that can

Re: global mbuf memory limit

2016-11-28 Thread Simon Mages
It seems netstat -m is not printing the correct results with this diff. The max values is wrong. # sysctl kern.maxclusters kern.maxclusters=262144 # netstat -m 9543 mbufs in use: 8044 mbufs allocated to data 1491 mbufs allocated to packet headers 8 mbufs allocated to socke

Re: global mbuf memory limit

2016-11-22 Thread Mark Kettenis
> Date: Tue, 22 Nov 2016 12:42:39 +1000 > From: David Gwynne > > right now pools that make up mbufs are each limited individually. > > the following diff instead has the mbuf layer have a global limit > on the amount of memory that can be allocated to the pools. this > is enforced by wrapping th

global mbuf memory limit

2016-11-21 Thread David Gwynne
right now pools that make up mbufs are each limited individually. the following diff instead has the mbuf layer have a global limit on the amount of memory that can be allocated to the pools. this is enforced by wrapping the multi page pool allocator with something that checks the mbuf memory limi