1824810 Members
4411 Online
109674 Solutions
New Discussion юеВ

Limit ftp bandwith

 
SOLVED
Go to solution
Umbricht Daniel
Occasional Contributor

Limit ftp bandwith

Running hp-ux 11.00 on a N9000 server I'm looking for a way to limit the bandwith for ftp transfers. The WAN bandwith is only 15Mbs
and has to be shared with other traffic. I can not use QoS. Does anybody know of an application or of a parameter that can be used
to limit the ftp bandwith?
Thanks for any help

Daniel
6 REPLIES 6
Bill Hassell
Honored Contributor

Re: Limit ftp bandwith

Not possible with settings. ftp is specifically designed to maximize the data rate based on the connection speed. You mat wish to use an extra LAN card in the 9000 that is hardcoded to 10Mb and then run ftp through that card. That will keep the maximum ftp throughput to less than 8Mbs. If that is still too fast, your only solution is a load balancer appliance whereby the appliance limits bandwidth per port.


Bill Hassell, sysadmin
James A. Donovan
Honored Contributor
Solution

Re: Limit ftp bandwith

You may want to take a look at rsync. It was designed with your situation in mind. It has a bandwidth limiting option;

--bwlimit=KBPS limit I/O bandwidth, KBytes per second

which may meet your needs.

http://rsync.samba.org
Remember, wherever you go, there you are...
Ron Kinner
Honored Contributor

Re: Limit ftp bandwith

Ask your network guy. It's a piece of cake for a Cisco router. Custom Queuing will do the trick.

Ron
rick jones
Honored Contributor

Re: Limit ftp bandwith

By default the HP-UX 11 ftp uses a 56KB socket buffer. One of the limitations to the throughput of a TCP connection is the window size divided by the round-trip time. If you ping a system on the other end of that 15 Mbps link, and then do a bit of math starting with

Tput = W/RTT

You can, since you have the RTT (or at least an aproximation of it) and the desired throughput, solve for W.

Now you can edit the /etc/inetd.conf file to specify the desired window size in a -B option. That will deal with inbound requests. To deal with outbound requests, you will need to wrap a shell script around the ftp client, also giving a -B option.

Now, this will be on a session by session basis, not the aggregate for FTP. So, in theory if enough FTP transfers are opened they can still take all the bandwidth.

There may also be a way to limit the bandwidth to FTP traffic with ipfilter.
there is no rest for the wicked yet the virtuous have no pillows
Brian Markus
Valued Contributor

Re: Limit ftp bandwith

Think outside the box :) There are several 3rd party FTPD's that can do this. ProFTPD, and GLFTPD can both limit user download/upload speed. I run proftpd on 3 of my HPUX boxes. It's easy to configure, and is rock solid. You can install it on a different port for testing if you are concerned about its ability. The config file is like a giant file.

Hope this helps

-Brian.
When a sys-admin say's maybe, they don't mean 'yes'!
Umbricht Daniel
Occasional Contributor

Re: Limit ftp bandwith

Thanks guys for all your suggestions.
I'll try some of them but since we are in the middle of System Accept Tests I have to delay these action.
Daniel