From: Vlad S. <vl...@cr...> - 2006-01-03 00:07:02
|
As i see it by default nsd does not use mmaps, only for uploads, yes it might need to review this again, mmap for big movie/iso files is not appropriate and i am using nsd for those kinds of files most of the time. Stephen Deasey wrote: > On 1/2/06, Vlad Seryakov <vl...@cr...> wrote: > >>I did very simple test, replaced write with aio_write and at the end >>checked aio_error/aio_return, they all returned 0 so mmap should work >>because file is synced. when i was doing aio_write i used aio_offset, so >>each aio_write would put data into separate region on the file. >> >>Unfortunately i removed modified driver.c by accident, so i will have to >>do it again but something is not right in simply replacing write with >>aio_write and mmap. Without mmap, GetForm will have to read the file >>manually and parse it, it makes it more complicated and still, if writes >>are not complete we may get SIGBUS again. >> >>The problem i see here i cannot be sure that all writes are completed, >>aio_error/aio_return are used to check only one last operation, not the >>batch of writes. > > > > We might have to drop mmap support anyway. We're trying t accommodate > large files, so we may run out of address space. > > This summer I was running thttpd to serve some iso images. I started > getting busy errors when very little bandwidth was being used, and > with only 3 concurrent users. It turns out that a couple of extra > images were published, and the users were all downloading different > ones. As thttpd uses mmap to read the files, the process ran out of > address space. It doesn't take much... > > We still have to support mmap for reading in the case that a module > calls Ns_ConContent(), but otherwise we can use read/write etc. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&op=click > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |