X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 30 Apr 2008 10:50:35 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: inetutils 1.5 / ftpd problem: 426 Data connection: No buffer space available. Message-ID: <20080430085035.GM23852@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <3ee066b40804292141k764cb66al5ac97c6fb8111bb AT mail DOT gmail DOT com> <48180A91 DOT 5080001 AT cwilson DOT fastmail DOT fm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48180A91.5080001@cwilson.fastmail.fm> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/