[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Total failure in dav layer when >1024 files already open

From: Martin v. Löwis <Martin.vonLoewis_at_hpi.uni-potsdam.de>
Date: 2006-06-05 17:19:19 CEST

Michael Sweet wrote:
> The select() method is O(n). The poll() method is O(n log n) unless
> you manage a large array that maps from FD to the corresponding
> state data for that FD, which can eat up a LOT of memory...

You are assuming an implementation strategy here. poll() is
O(number-of-polled-fds) on Linux. Yes, there is an array of all
files, per process, but that does not consume a LOT of memory.
Instead, it consumes one pointer per file number, up to some
dynamically-determined maximum.

OTOH, select is O(maximum-fd-value). Assuming you always pass
only a few file descriptors to select/poll, poll is more
efficient if the process has many open files.

Regards,
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 5 17:20:06 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.