I am using Net_SFTP / phpseclib to upload files to a remote SFTP server. When uploading the test file from the sftp command line I average about 50Mbps. When uploading the same files from and to the same servers using PHPSecLib Net_SFTP I am only able to achieve about 17.0Mbps transfer rate.
Here is the code I am using for the transfer. I checked and there does not appear to be any CPU usage / networking bottle neck for the transfer. Any ideas on how to get the transfer rate up?
Note that I am using PHP version 5.6 and the newest version of phpseclib that I just downloaded from their site. I also verified that mcrypt is enabled via phpinfo().
Also running $sftp->getServerIdentification() results in
SSH-2.0-9.99 sshlib: 8.1.0.0
When connecting to the SFTP Server.
Here is the test code that only results in 17Mbps...
$port = 22;
$host = 'xxxxxxxxxxxxxx';
$user = 'xxxxxxxxxxxxxx';
$pass = 'xxxxxxxxxxxxxx';
$sftp = new Net_SFTP($host, $port);
if (!$sftp->login($user, $pass)) {
exit('Login Failed');
}
$localFile = '000000.pdf'; //This is about a 300Mb test file
$ftpFile = '/Account/Testing/0000000.pdf';
$ftpResult = $sftp->put($ftpFile, $localFile, NET_SFTP_LOCAL_FILE);
$sftp->disconnect();