[JSch-users] Enormous traffic when uploading file to non-empty folder
Status: Alpha
Brought to you by:
ymnk
From: Milano N. <dra...@gm...> - 2016-08-24 07:34:41
|
After further investigation I tested two scenarios of uploading a file to the SFTP server. In scenario one I only had a handful of files in the upload directory, in the second scenario there were 6400 tiny files more. *Scenario 1:* lstat takes about 1 sec to execute. Tcpdump shows 907020 bytes traffic for a 800 KB file... 2016-08-23 13:19:28,655 [TRACE] SFTP Operation - Get file attributes (lstat): /home/milano/upload_test/Clean_code.pptx 2016-08-23 13:19:30,844 [TRACE] SFTP Operation - Getting file attributes finished. 2016-08-23 13:19:30,877 [TRACE] SFTP Operation - Get file attributes (lstat): /home/milano/upload_test/Clean_code.pptx 2016-08-23 13:19:32,044 [TRACE] SFTP Operation - Getting file attributes finished. *Scenario 2:* lstat takes about 110 sec to execute. Tcpdump shows 4130593 bytes traffic for a 800 KB file... 2016-08-23 14:05:10,222 [TRACE] SFTP Operation - Get file attributes (lstat): /home/milano/upload_test/Clean_code.pptx 2016-08-23 14:06:58,868 [TRACE] SFTP Operation - Getting file attributes finished. 2016-08-23 14:06:59,336 [TRACE] SFTP Operation - Get file attributes (lstat): /home/milano/upload_test/Clean_code.pptx 2016-08-23 14:08:45,189 [TRACE] SFTP Operation - Getting file attributes finished. So the upload took about the same time in the end, but it was the lstat command using a lot of data. Now I have to find out how to avoid such behaviour... |