Comments (5)
Are you using UseConcurrentReads and UseConcurrentWrites ?
How come a compiled code is even slower than a interpreting code?
Look, I enjoy jokes at Javaās expense, but Java is compiled code, and not interpreted. The bytecode hasnāt been executed through an interpreter instead of a just-in-time compiler since the 90s.
But since the primary delays in transferring data across a network or the internet is usually the delay in transferring packets, I also wouldnāt be surprised if an actually interpreted language could still beat out our non-concurrent code, if it were issuing concurrent requests.
And so slow?
An earlier design made concurrent reads and writes more dangerous, so we turned them off by default. I think weāve worked out that issue now, but we havenāt yet switched it back to default on, because there are some really weird esoteric servers out there that have been known to unexpectedly delete peopleās files if you look at the file wrong. So, out of an abundance of caution, and because itās all documented right there in the documentationā¦ š¤·āāļø
Out-of-band, before firing off a similar hot take to any other project, I would strongly recommend checking everything a lot more thoroughly. You may be working from insufficient information, and/or invalid assumptions, and then your snark wonāt come across as all too funny.
from sftp.
Thank you Cassondra for the explanation and advice.
First, I apologize for the harsh word I made. I didn't mean it.
I was kind of surprised and disappointed when I saw that Go was so much slower than Java in my testing, cause the reason why I tried Go was to hope to replace a sftp tool written in Java and running in z/OS, which was too slow due to the performance of JVM, with a much faster solution.
Now your comment "But since the primary delays in transferring data across a network or the internet is usually the delay in transferring packets" brought me a second thought.
But anyway, I'd like to give you more info about what I've tried.
I hadn't try concurrent read or write before. But after I saw your comment, I tried it, unfortunately, I still didn't see much difference.
The same file transfer still took 36 minutes with Go, while it took 8 minutes with Java.
I am not sure if I made any mistake or misused the sftp package. Could you please help take a look?
Please find attached the code I used.
sftp.go.txt
from sftp.
Hm. I cannot seem to see any reason why your Go code should be unnecessarily slow. š¤ You might try increasing the MaxConcurrentRequestsPerFile as well?
from sftp.
Hi Cassondra,
I tried changing MaxConcurrentRequestsPerFile with 3 values (I assume that the default is 60):
100: it took 34 minutes
200: it took 55 minutes
30: it took 60 minutes.
Seems there is no hope to make it much faster with this config.
Do you have any idea what could be the especial of z/OS that causes this problem?
from sftp.
I hadnāt even heard of z/OS until you mentioned it. So, I donāt really have any insight to help you here. As the platform is not āout-of-the-boxā supported, it could just be poor optimizations? š¤·āāļø
from sftp.
Related Issues (20)
- IETF Link has rotted HOT 2
- Support for the Afero interface HOT 5
- mandatory workDir even for absolute paths HOT 1
- Unable to delete the selected user: Not Found HOT 3
- Change current working directory? HOT 2
- proposal/exposeRemoveFile HOT 2
- Request attributes are not being propagated for SSH_FXP_OPEN operation HOT 5
- Should Seek() io.SeekStart and io.SeekCurrent do the different things? HOT 1
- sftp client hang when exit in sftp server example HOT 2
- Connection lost when using library with limited bandwidth HOT 5
- In Windows, `Server` should allow a pseudo-directory for `/` which enumerates available drives HOT 22
- How can I perform sftp download and upload feature for multiple files at root directory and within nested subfolder using https://github.com/pkg/sftp HOT 3
- close file double time sometimes cause copy problem wh HOT 10
- how to handle binary and ascii file transfer to and from sftp server? HOT 1
- The performance of transferring file is bad HOT 1
- getting error while creating a client in a multithreaded usecase "Failed to create SFTP client: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF" HOT 8
- Does this package Support z/OS (s390x) or not? HOT 2
- Proposal: Standardized FileInfo Structure. RE: z/OS performance investigation HOT 1
- Question about sshFxpOpendirPacket packet HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sftp.