If you are going to use Pure-FTPd on a highly loaded server, here are some
hints to get the best performances:

- Compile with:

env CFLAGS="-O2 -fomit-frame-pointer -fgcse -Os" ./configure --with-minimal --without-inetd --without-pam
make install-strip

- Run it in standalone mode. Don't use -C, don't enable pure-ftpwho nor
pure-uploadscript (-o), nor per-user limits (-y) .

- Increase your system max descriptors number and local port range. On a Linux kernel, you can try:

echo 2000 > /proc/sys/fs/super-max
echo 60000 > /proc/sys/fs/file-max
ulimit -n 60000
echo 30000 65534 > /proc/sys/net/ipv4/ip_local_port_range

- On a Linux kernel, disable syncookies, ecn, timestamps and window scaling:

echo 0 > /proc/sys/net/ipv4/tcp_syncookies
echo 0 > /proc/sys/net/ipv4/tcp_ecn
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

- Disable access time update on your mounted filesystems. 
On a Linux system,just add 'noatime,nodiratime' for each mount point 
in your /etc/fstab file.

- Disable syslog output and DNS lookups. Run it with:

/usr/local/sbin/pure-ftpd -f none -H

'opensource' 카테고리의 다른 글

Pureftpd MySQL authentication README  (0) 2010.06.22
Pureftpd Virtual-Users README  (0) 2010.06.22
redmine  (0) 2010.06.17
freebsd documents  (0) 2010.04.08
pureftpd - logging  (0) 2010.02.20
Latest update: 2010. 2. 20. 17:02
             --------------------- LOGGING ---------------------


Log messages are sent to the syslog daemon. You can disable logging with
'-f none'.
If you want all FTP messages to be redirected to a file, say /var/log/ftp,
add this line to your /etc/rsyslog.conf file:

ftp.*   /var/log/ftp

Then restart your syslogd daemon:

killall -HUP rsyslogd

You can also drop your old "syslogd" and "klogd" programs for Metalog, an
efficient alternative: http://metalog.sourceforge.net/

Names of uploaded/downloaded files are logged with paths like this:

                           /home/ftp//pub/bla.jpg
                           
The double-slash ('//') is the chroot limit.


Set Log Rotation


 log]# cd /etc
 etc]# cd logrotate.d
 logrotate.d]# cat rsyslog
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron /var/log/xferlog {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}
logrotate.d]#


'opensource' 카테고리의 다른 글

Pureftpd MySQL authentication README  (0) 2010.06.22
Pureftpd Virtual-Users README  (0) 2010.06.22
redmine  (0) 2010.06.17
freebsd documents  (0) 2010.04.08
pureftpd - OPTIMIZING FOR HIGH LOAD  (0) 2010.02.20
Latest update: 2010. 2. 20. 16:35
       /* The limit value will normally, but not necessarily, be an
        * expression in kilo-bytes, mega-bytes, or giga-bytes. Even
        * when the limit doesn't refer to kilo-byte units, treat it
        * as such for the qualifiers. Ignore anything larger since
        * it will overflow unsigned long on 32-bit systems.
        */
       switch (ap_toupper(*limit)) {
       default:
               return "Invalid units for limit.";
       case 'G':
               config->limit *= 1024;
       case 'M':
               config->limit *= 1024;
       case 'K': case '\0':
               break;
       }


it will overflow unsigned long on 32-bit systems.

range: 0 - 2^32-1


수년간 사용해온 소스에 버그가 있었다.
apache 1.3 에서 많이 사용되는 mod_throttle 소스에
중대한 버그가 있다.


'programming' 카테고리의 다른 글

eclipse에서 VI 로 JAVA 코딩하기  (0) 2010.05.21
rpcgen  (0) 2010.04.08
IRIX® Network Programming Guide  (0) 2010.04.08
endian check code  (0) 2010.03.31
Kdevelop - Doxygen  (0) 2010.02.04
Latest update: 2010. 2. 19. 13:53