# FTP / web servers run super slow over internet.

## crimson

I have pure-ftpd and apache2 installed and running, they are accessible both on my LAN and over the internet.  I have cable internet, with 5Mb/s down, around 600Kb/s up.  

When I first installed it about a month ago, files could be downloaded from my FTP server or images downloaded from the web server at around 60KB/s.  For some reason, now they can only be downloaded from FTP, or web server at 1KB/s.  I haven't added any type of bandwidth limiting... what is causing this?  I can download over the LAN at max speeds (around 100Mb/s), and online speed tests show that I am still getting around 600-700Kb/s upload, but why can't anyone download from my ftp or webserver faster than 1000 bytes / second?  It's excruciatingly slow, and I dont understand what's limiting it.

----------

## alex.blackbit

i would not trust such tests.

maybe your ISP is limiting the upload speeds somehow?

maybe they wrote something on their website.

do you know somebody who was the same provider? it would be interesting if the results are the same there.

----------

## crimson

 *alex.blackbit wrote:*   

> i would not trust such tests.
> 
> maybe your ISP is limiting the upload speeds somehow?
> 
> maybe they wrote something on their website.
> ...

 

The tests are valid, I even connected to an ftp server (from the computer my ftp server is on), and uploaded a file, and it uploaded at over 60KB/s.

I also tried changing the Web server port to various numbers (from port 80 to 8888, and 73), to see if ISP was limiting speeds by port, and traffic was stuck at 1KB/s.  :Sad: .  Is there anything within my linux system that could be limiting bandwidth out to the internet?  Maybe it is the ISP, but I don't know how they would only be able to limit my server traffic, and not everything else.

Any ideas?

----------

## OmSai

I have an identical problem with net-ftp/proftpd-1.3.1_rc2-r3 on www-servers/apache-2.2.8

I'm on a University T-1 network with a typical upload speed of 700Mbps.

I checked that the bandwidth between my Gentoo server (here in NY) and node (in IL) where I'm downloading at is 1.6Mbps using net-misc/iperf-2.0.2

But the download is getting restricted to 70kbps on FTP

I get the same speed with SFTP as well.

I don't have any iptables or tc (sys-apps/iproute2) setup to limit bandwidth.

```
# This is a basic ProFTPD configuration file (rename it to

# 'proftpd.conf' for actual use. It establishes a single server

# and a single anonymous login. It assumes that you have a user/group

# "nobody" and "ftp" for normal operation and anonymous access.

ServerName              "ProFTPD Default Installation"

ServerType              standalone

DefaultServer           on

RequireValidShell       off

AuthPAM                 on

AuthPAMConfig           ftp

# Port 21 is the standard FTP port.

Port                    8444

PassivePorts            49000 65534

# Umask 022 is a good standard umask to prevent new dirs and files

# from being group and world writable.

Umask                   022

# To prevent DoS attacks, set the maximum number of child processes

# to 30. If you need to allow more than 30 concurrent connections

# at once, simply increase this value. Note that this ONLY works

# in standalone mode, in inetd mode you should use an inetd server

# that allows you to limit the maximum number of processes per service

# (such as xinetd).

MaxInstances            30

# To cause every FTP user to be "jailed" (chrooted) into their home

# directory, uncomment this line.

DefaultRoot /media/ftp

# Set the user and group under which the server will run.

User                    ftp

Group                   ftp

# Normally, we want files to be overwriteable.

<Directory /media/ftp>

        AllowOverwrite          on

</Directory>

# A basic anonymous configuration, with no upload directories.

<Anonymous ~/manoj>

        User                            ftp

        Group                           ftp

        AnonRequirePassword             no

#       # We want clients to be able to login with "anonymous" as well as "ftp".

        UserAlias                       anonymous ftp manoj

        # Limit the maximum number of anonymous logins.

        MaxClients                      10

        # We want 'welcome.msg' displayed at login, and '.message' displayed

        # in each newly chdired directory.

        DisplayLogin                    welcome.msg

        DisplayFirstChdir               .message

        # Limit WRITE everywhere in the anonymous chroot.

        <Limit WRITE>

                DenyAll

        </Limit>

        <Directory incoming>

                <Limit READ WRITE DIRS STOR CWD CDUP>

                        AllowAll

                </Limit>

        </Directory>

</Anonymous>
```

```
Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-zen4-g4bbcf6dd x86_64)

=================================================================

System uname: 2.6.24-zen4-g4bbcf6dd x86_64 AMD Athlon(tm) 64 Processor 3800+

Timestamp of tree: Wed, 26 Mar 2008 20:15:04 +0000

ccache version 2.4 [enabled]

app-shells/bash:     3.2_p17-r1

dev-java/java-config: 1.3.7, 2.1.4

dev-lang/python:     2.4.4-r9, 2.5.1-r3

dev-python/pycrypto: 2.0.1-r6

dev-util/ccache:     2.4-r7

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.22-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=athlon64 -O2 -pipe -ggdb"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/rc.d /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d /usr/share/X11"

CXXFLAGS="-march=athlon64 -O2 -pipe -ggdb"

DISTDIR="/usr/portage/distfiles"

FEATURES="ccache collision-protect distlocks fixpackages metadata-transfer nostrip sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ "

LINGUAS="hi"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/font-overlay /usr/local/portage /usr/local/overlays/xfce4-svn"

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

USE="3dnow 3dnowext X a52 aac acl acpi alsa amd amd64 apache2 avi berkdb cdr cli cracklib crypt cups dbus directfb divx divx4linux dri dts dvd dvdnav dvdread encode fame firefox flac fortran gdbm gif gmedia gpm gtk hal iconv inifile ipod ipv6 isdnlog jpeg ldap libnotify live lm_sensors logitech-mouse mad matroska mesa midi mjpeg mmx mp3 mpeg mplayer mudflap ncurses newspr nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp oss pam pcre pdf png pppd python qt3 qt4 quicktime readline realmedia reflection samba scanner sdl session spell spl sse sse2 ssl startup-notification subtitles svg swat tcpd tetex theora tiff truetype type1 unicode vorbis wma wmp xanim xcomposite xinetd xorg xscreensaver xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias auth_mysql" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hi" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

----------

## crimson

Well it turns out for me that the servers are actually running at full speed (MOSTLY):

over the LAN - 100Mbps

Remote computer over the internet to server - around 80KB/s

LAN computer through the internet back to server - barely works.  

So for whatever reason, I can't connect from my local lan through the internet and back in to the server at any reasonable speed, but it doesn't matter.  I was only using this method to test the speeds internet users would get.

Anyway, I still don't quite understand why it acts this way, but it works just fine.

----------

