[stgt] tgtd memory usage

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Wed Apr 6 02:14:10 CEST 2011


On Tue, 5 Apr 2011 10:49:15 -0500
Neil Skrypuch <neil at pollstream.com> wrote:

> On April 4, 2011 8:05:16 pm FUJITA Tomonori wrote:
> > On Mon, 4 Apr 2011 17:44:03 +0300
> >
> > Or Gerlitz <ogerlitz at mellanox.com> wrote:
> > > FUJITA Tomonori wrote:
> > > > Yeah, this patch uses 16 global threads instead of creating 4 threads
> > > > per lun. Needs some cleanups though.
> > >
> > > Do we know why there's per thread memory consumption of 10MB?
> >
> > Seems that about 10MB VSZ per pthread is normal. Try some experiment
> > with simple pthread code.
> 
> FWIW, VSZ is not a good measure of memory usage (that memory is not 
> necessarily in use). RES is what you want to look at.

Yeah, true.


> I have a process here with 5000 threads, the VSZ is 78.6g, but RES is only 
> 284m. Needless to say, this machine doesn't have anywhere close to 78G of RAM 
> + swap, but runs this process just fine.
> 
> To the original poster: more likely you ran out of file descriptors and the 
> error message is just deceptive. The default per process fd limit is 1024 (2 
> fds per thread = ~500). Try ulimit -n 20000, then restart tgtd in the same 
> shell.

Hmm, I think that tgtd increases the fd limit internally.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list