How to limit ftp speed

The keyword is bandwidth management and the Linux Kernel has direct support of it. I dealed with this long time ago and have forgotten much about that but there is a great online book that covers the topic extensively. It's called

  • Linux Advanced Routing & Traffic Control.

To get a foretaste of what you want to achieve take a look at

  • Chapter 9. Queueing Disciplines for Bandwidth Management.

Perhaps there are (software) servers which support bandwidth control directly!?


Supplement:

  • In the pureftpd FAQ it is explained how to enable bandwidth limitation on the system level. On the first sight it seems to be applicable to other ftp servers as well.

  • There is another freely available book called

    How to Accelerate Your Internet: A Practical Guide to Bandwidth Management and Optimisation Using Open Source Software

    that deals with the topic. At first glance it seems to worth a look.


I found a way to limit ftp speed:

In the /etc/proftpd.conf insert this line:

TransferRate RETR,STOR,APPE,STOU 2000 

This will limit ftp speed to 2 megabyte per second.

After changing the file you should restart the proftpd service:

/etc/init.d/proftpd restart