inetutils 1.5 / ftpd problem: 426 Data connection: No buffer space available.

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Apr 30 10:59:00 GMT 2008


On Apr 30 01:58, Charles Wilson wrote:
> antony baxter wrote:
>>> 1. In all cases, the ftpd process' memory usage increases to ~350mb,
>>> 2. As the buffer value decreases, the process' cpu usage increases
>>> (ftpd-1k.exe used about 75% of the cpu vs. about 10% for ftpd-8k.exe),
>>> 3. Performance jumped around (ftpd-1k transferred the file in
>>> 90seconds, ftpd-4k in 166 seconds, ftp-8k in 114 seconds on a wired
>>> network)
>> Quick addendum: I copied over in.ftpd.exe from another Cygwin
>> installation running inetutils 1.3.2 and symlinked it to ftpd on my
>> server; using that to serve the same file, memory usage sticks at
>> 3500kb, cpu usage never rises about 5%, and the file was delivered in
>> 194 seconds.
> 
> Well, one of the differences between ftpd-1.3.2 and ftpd-1.5 is that the 
> newer version uses mmap on the (local) file.  ftpd.c is the /only/ source 
> file in inetutils that uses mmap.

Ok, so the ftpd using mmap is faster, one way or another.

> So, I recompiled with HAVE_MMAP turned off (but still using 4k chunks). 
> Give this a try:
>
> http://cygwin.cwilson.fastmail.fm/ITP/ftpd-no-mmap-4k.exe.bz2
>
> I get behavior here which is very similar to what I reported for the 
> 4k-WITH-mmap version:
>   (1) sane memory profile
>   (2) topology one, 9-10 Mbps 2-3% cpu
>   (3) topology two, 14-15 Mbps, 4-6% cpu [*]
>
> I'm not sure what benefit mmap has in this case -- unless you can exploit 
> some zero-copy kernel code for transferring data from disk to ethernet 
> device. But I don't think Windows has anything like that. I certainly don't 
> *see* any benefit, in my limited testing on this set of hardware.
>
> If this *does* fix the problem, it may point to an issue with cygwin-1.5's 
> mmap implementation, or with XP's handling of the underlying 
> NtCreateSection()...mmap is not supposed to be CPU-intensive.

There might be a bug lurking somewhere.  Could you create a very simple
testcase which basically behaves like ftpd for debugging?


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list