Re: tgtd memory usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Neil Skrypuch <neil@xxxxxxxxxxxxxx> wrote:
> 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.
> 

Using "lsof -p" or looking in /proc/$PID/fd I am seeing a base of 14
fds (i.e. with no targets / luns defined). I then see the 1 fd per real
lun (4 targets with 250 luns each gives 1014 total). I then login to the
targets and generate 4 more fds from the sockets (1018 total).

-andmike
--
Michael Anderson
andmike@xxxxxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux