From owner-freebsd-questions@FreeBSD.ORG Wed Aug 10 08:29:31 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C884216A41F; Wed, 10 Aug 2005 08:29:31 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3821143D48; Wed, 10 Aug 2005 08:29:30 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.13.3/8.13.3) with ESMTP id j7A8TJMH098733; Wed, 10 Aug 2005 12:29:19 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Wed, 10 Aug 2005 12:29:19 +0400 (MSD) From: Maxim Konovalov To: Mikhail Teterin In-Reply-To: <200508100440.j7A4ekqp025584@corbulon.video-collage.com> Message-ID: <20050810122339.F97163@mp2.macomnet.net> References: <200508100440.j7A4ekqp025584@corbulon.video-collage.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: questions@freebsd.org, net@freebsd.org Subject: Re: very busy ftpd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 08:29:31 -0000 On Wed, 10 Aug 2005, 00:40-0400, Mikhail Teterin wrote: > > > I just noticed, that uploading a file over a LANG (at around > > > 5.7Mb/s) resulted in around 25% CPU consumption by the ftpd. > > > > > > I think, that's unusual for a Pentium4 -- what is the process doing? > > > > Check the client does not use ascii mode when uploading (getc() vs > > read()). > > That's quite possible, indeed. I wouldn't put it past some users -- > some still use the ancient ftp-clients, which default to text-mode > transfers. > > Is there any way to disable this mode on the server, perhaps? Even > if it violates the protocol :-/ A dirty hack: Index: ftpcmd.y =================================================================== RCS file: /home/ncvs/src/libexec/ftpd/ftpcmd.y,v retrieving revision 1.64 diff -u -r1.64 ftpcmd.y --- ftpcmd.y 18 Nov 2004 13:46:29 -0000 1.64 +++ ftpcmd.y 10 Aug 2005 08:23:09 -0000 @@ -379,6 +379,9 @@ switch (cmd_type) { case TYPE_A: + reply(504, "Type A not implemented."); + break; +#if 0 if (cmd_form == FORM_N) { reply(200, "Type set to A."); type = cmd_type; @@ -386,7 +389,7 @@ } else reply(504, "Form must be N."); break; - +#endif case TYPE_E: reply(504, "Type E not implemented."); break; %%% -- Maxim Konovalov