You are not logged in.

#1 2010-08-24 18:04:15

Kosmonavt
Member
Registered: 2010-02-15
Posts: 100

vsftpd and large downloads - cache problem

Today I have raised vsftpd to transfer a lot of files (~30 GB) to my friend's machine. At start all was ok - full download speed was 2 MB/s, and iotop showed these MB's read from FS. When about 4 GB where downloaded  from me, strange things happened. Despite config file (max_clients and max_per_ip were 10, friend was using 10 simulateonous connections in filezilla), many following messages appeared in log (xxx.xxx.xxx.xxx - friend's address):

Tue Aug 24 16:30:05 2010 [pid 2] CONNECT: Client "xxx.xxx.xxx.xxx", "Connection refused: too many sessions."

Also the speed felt dramatically - at start there was ~220 KB/s per connection, now lower than 10 KB/s. iotop shows only eventual 124 KB reads from vsftpd. Cache filled all my memory (600 MB data - it's running KDE4 plus some documents and Opera opened):

$ free -m
             total       used       free     shared    buffers     cached
Mem:          3862       3806         55          0        441       2766
-/+ buffers/cache:        599       3263
Swap:         2047          0       2047

Also responsiveness of system changed strangely - operations with disk are as fast as usual, but with RAM became much slower. E.g., I use pacman-cage, and now pacman -Syu works many times slower. I know that reboot would take away this problem, but it's only partial solution.

Is it the intended caching behavior? (IMO, it's rather not)
How can be I/O optimized to not to overload cache?

P.S. My vsftpd.conf:

listen=YES

# User access parameters
anonymous_enable=YES
anon_upload_enable=NO

local_enable=YES
write_enable=NO
download_enable=YES
connect_from_port_20=YES

# Userlist
#userlist_deny=NO
userlist_enable=NO
#userlist_file=/etc/vsftpd/vsftpd_users

force_dot_files=YES
hide_ids=YES
deny_file={lost+found}
ls_recurse_enable=YES
local_umask=026
ascii_download_enable=NO

# Limits
max_clients=10
max_per_ip=10
#connect_timeout=60
data_connection_timeout=3000
idle_session_timeout=6000

# Messages
dirlist_enable=YES
dirmessage_enable=YES
ftpd_banner=Welcome to Stonehenge-III FTP archive

# Encryption
ssl_enable=NO
allow_anon_ssl=NO
force_local_data_ssl=NO
force_local_logins_ssl=NO                                                                                                 
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/vsftpd/vsftpd.pem
pam_service_name=vsftpd

# Chroot everyone
chroot_local_user=YES
passwd_chroot_enable=YES
chroot_list_enable=NO
#local_root=/srv/ftp/

# Logging
xferlog_enable=YES

P.P.S. Tried to find appropriate forum. If I was wrong, please move it to a better one.

Offline

#2 2010-08-27 00:24:03

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: vsftpd and large downloads - cache problem

since your on a fast network, lower your timeout values, they are much too high, also, increase your connections to 15, but tell your friend to only download using 10 or lower connections.

are the files downloaded small (many files) or large ones. check /var/log/everything.log for related error messages, e.g, I/O, file descriptors.

Offline

Board footer

Powered by FluxBB