joetesta has asked for the wisdom of the Perl Monks concerning the following question:
I have an automated script using Net::FTP to upload large files and I saw from MRTG graphs that it's transferring at a rate of about 80Mbps. Since our commitment is only 50Mbps, and we don't want to get hit with overage charges, I tried to find a way to limit the upload speed to somewhere around 50Mbps.
I tried implementing Net::FTP::Throttle like this:
But it is maxing out at about 6.5Mbps - no matter what values I try for Bytes_read, BlockSize, and MegabitsPerSecond, MRTG shows a max upload rate of about 6.5Mbps. This is too slow, does anyone know why this might be happening or another good way to limit FTP script to 50mbps? Thank you very much in advance. With kind regards, joemy $ftp = Net::FTP::Throttle->new($host, Debug => 0, Passive => 1, Bytes_read => 4096, BlockSize => 4096, MegabitsPerSecond => 50) or die "Cannot connect: $@";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Net::FTP::Throttle
by BrowserUk (Patriarch) on Aug 01, 2012 at 23:21 UTC | |
by joetesta (Novice) on Aug 02, 2012 at 17:57 UTC | |
by BrowserUk (Patriarch) on Aug 02, 2012 at 23:06 UTC | |
|
Re: Using Net::FTP::Throttle
by joetesta (Novice) on Aug 01, 2012 at 22:59 UTC | |
|
Re: Using Net::FTP::Throttle
by flexvault (Monsignor) on Aug 03, 2012 at 11:52 UTC | |
by Anonymous Monk on Jan 16, 2013 at 01:01 UTC |