diff options
author | wollman <wollman@FreeBSD.org> | 1995-05-03 16:58:12 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-05-03 16:58:12 +0000 |
commit | 687339a1f2d61a6d320ab967f1ec2109472db608 (patch) | |
tree | ea7b68bd499ae6904a7bfa6fd18c7e1beff543a8 /lib/libdisk/tst01.c | |
parent | 224e718f65b67a3cfe208d2895e6e87f55fdfffc (diff) | |
download | FreeBSD-src-687339a1f2d61a6d320ab967f1ec2109472db608.zip FreeBSD-src-687339a1f2d61a6d320ab967f1ec2109472db608.tar.gz |
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.
Diffstat (limited to 'lib/libdisk/tst01.c')
0 files changed, 0 insertions, 0 deletions