I've run into some issues recently trying to move roughly 200 files totaling about 27G over SFTP. I don't really expect the performance to match up to the native utilities, but for sake of completeness, in 100 tests of files ranging from 2MB to 2GB, the the discrepancy between the linux sftp command tool and the j2ssh-maverick test class below is about 10x on put operations and well over 80x on get operations. In the tests, both servers are reading and writing to SSD with 8GB of dedicated memory and 2 dedicated CPU. I ran the same experiment over a GigE and 40G network, both in house, with little to no load on them.
My first question is how on earth can read and write performance differ so dramatically in the opposite direction? I've tried changing the SFTPClient blockSize, bufferSize, and the tcp socket preferences, but anything less than loading the entire file into memory causes put to slow down and get to crawl.
Second, we purchased a license to the Maverick Legacy Client a few years back and, because we open sourced our project, switched over to this library. None of the above behavior occurs in the commercial product, despite the current j2ssh-maverick library being a fork of the commercial library. Is the open source library intentionally throttled in some way? That would explain the dramatic increase in failure rates we've seen since switching from the commercial version.
I've run into some issues recently trying to move roughly 200 files totaling about 27G over SFTP. I don't really expect the performance to match up to the native utilities, but for sake of completeness, in 100 tests of files ranging from 2MB to 2GB, the the discrepancy between the linux
sftpcommand tool and the j2ssh-maverick test class below is about 10x onputoperations and well over 80x ongetoperations. In the tests, both servers are reading and writing to SSD with 8GB of dedicated memory and 2 dedicated CPU. I ran the same experiment over a GigE and 40G network, both in house, with little to no load on them.My first question is how on earth can read and write performance differ so dramatically in the opposite direction? I've tried changing the SFTPClient blockSize, bufferSize, and the tcp socket preferences, but anything less than loading the entire file into memory causes
putto slow down andgetto crawl.Second, we purchased a license to the Maverick Legacy Client a few years back and, because we open sourced our project, switched over to this library. None of the above behavior occurs in the commercial product, despite the current j2ssh-maverick library being a fork of the commercial library. Is the open source library intentionally throttled in some way? That would explain the dramatic increase in failure rates we've seen since switching from the commercial version.