From owner-cvs-libexec Wed May 3 09:58:25 1995 Return-Path: cvs-libexec-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id JAA04874 for cvs-libexec-outgoing; Wed, 3 May 1995 09:58:25 -0700 Received: (from wollman@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id JAA04851 ; Wed, 3 May 1995 09:58:14 -0700 Date: Wed, 3 May 1995 09:58:14 -0700 From: "Garrett A. Wollman" Message-Id: <199505031658.JAA04851@freefall.cdrom.com> To: CVS-commiters, cvs-libexec Subject: cvs commit: src/libexec/ftpd ftpd.c Sender: cvs-libexec-owner@freebsd.org Precedence: bulk wollman 95/05/03 09:58:13 Modified: libexec/ftpd ftpd.c Log: Speed up ftpd and make it more efficient: - set TCP_NOPUSH to keep from sending short packets at each write(2) boundary - set SO_SNDBUF to 64k so we have a reasonable amount of buffer space - for a regular file in binary mode which is not being restarted and is . smaller than 16 Meg, use mmap(2) and write(2) the whole file in one big gulp In the most common circumstances, this should dramatically reduce the system-call load from ftpd, since the call to write() will not return until the entire file has been written, rather than writing just a few K at a time in a loop.