Kamal Bhatt
2007-06-05 06:47:59 UTC
I am reading/writing to Remote SFTP server using libssh2 library. However
there is very poor performance compared to the sftp utility comes along with
UNIX.
I am using *libssh2-0.14 *version.
I tried to investigate the library and found that for Read maximum packet
size is 40000 bytes and for write there is a loop going which will send the
data in chunks of 32KB.
I then tried to increase the SFTP Packet size by changing
LIBSSH2_SFTP_PACKET_MAXLEN to 64KB hoping that then we can read/write in
chunks of 64KB but of no use since after building the library even it was
not able to establish the session with the remote SFTP server.
I also tried changing various constants like
LIBSSH2_PACKET_MAXPAYLOAD
LIBSSH2_PACKET_MAXCOMP
LIBSSH2_PACKET_MAXDECOMP
LIBSSH2_CHANNEL_WINDOW_DEFAULT
But still I was not able to increase the performance.
Is there some way that by changing these constants or some other things we
can increase the performance SFTP read/write using libssh2 or any other
workaround so as to how to increase the performance?
Any pointers from you will be of great help.
( Please help me about workarounds on *libssh2-0.14 *version for increasing
perofrmance as I have tested my entire application using this version of
library and moving to new version will be very difficult for me)
Thanks in advance.
there is very poor performance compared to the sftp utility comes along with
UNIX.
I am using *libssh2-0.14 *version.
I tried to investigate the library and found that for Read maximum packet
size is 40000 bytes and for write there is a loop going which will send the
data in chunks of 32KB.
I then tried to increase the SFTP Packet size by changing
LIBSSH2_SFTP_PACKET_MAXLEN to 64KB hoping that then we can read/write in
chunks of 64KB but of no use since after building the library even it was
not able to establish the session with the remote SFTP server.
I also tried changing various constants like
LIBSSH2_PACKET_MAXPAYLOAD
LIBSSH2_PACKET_MAXCOMP
LIBSSH2_PACKET_MAXDECOMP
LIBSSH2_CHANNEL_WINDOW_DEFAULT
But still I was not able to increase the performance.
Is there some way that by changing these constants or some other things we
can increase the performance SFTP read/write using libssh2 or any other
workaround so as to how to increase the performance?
Any pointers from you will be of great help.
( Please help me about workarounds on *libssh2-0.14 *version for increasing
perofrmance as I have tested my entire application using this version of
library and moving to new version will be very difficult for me)
Thanks in advance.