[stgt] tgtd memory usage

Neil Skrypuch neil at pollstream.com
Wed Apr 6 17:44:28 CEST 2011

On April 6, 2011 2:57:44 am Or Gerlitz wrote:
> Neil Skrypuch wrote:
> > 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.
> I wasn't sure to follow on the "2 fds per thread" part of your comment,
> specifically, it looks like in tgt the number of fds grows by one per
> non controller lun. So the over number of fds used is a constant number
> opened either on init or when the first target/lun are defined, and then
> another one per lun. This could be easily seen/verified using "lsof -p
> PID" with PID being the tgtd process-id
> Or.

I was just throwing a wild guess out there based on the numbers. Though, 
network sockets also count towards the fd limit, so if one initiator was 
connected per LUN, that would work out to 2 fds per thread.

- Neil
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