summaryrefslogtreecommitdiffstats
path: root/lib/libdisk/tst01.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-05-03 16:58:12 +0000
committerwollman <wollman@FreeBSD.org>1995-05-03 16:58:12 +0000
commit687339a1f2d61a6d320ab967f1ec2109472db608 (patch)
treeea7b68bd499ae6904a7bfa6fd18c7e1beff543a8 /lib/libdisk/tst01.c
parent224e718f65b67a3cfe208d2895e6e87f55fdfffc (diff)
downloadFreeBSD-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
OpenPOWER on IntegriCloud