-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance is much slower than a Java implementation when running in z/OS #579
Comments
Are you using UseConcurrentReads and UseConcurrentWrites ?
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.
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. |
Thank you Cassondra for the explanation and advice. First, I apologize for the harsh word I made. I didn't mean it. But anyway, I'd like to give you more info about what I've tried. I am not sure if I made any mistake or misused the sftp package. Could you please help take a look? |
Hm. I cannot seem to see any reason why your Go code should be unnecessarily slow. 🤔 You might try increasing the MaxConcurrentRequestsPerFile as well? |
Hi Cassondra, I tried changing MaxConcurrentRequestsPerFile with 3 values (I assume that the default is 60): 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? |
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? 🤷♀️ |
I tried to receive a file from Linux to USS of z/OS (running in a Linux emulator which is called ZD&T), and compared the performance between using GoLang and Java.
When running the built code written in GoLang and this sftp package, it took 42 minutes and 30 seconds to receive a 940M file.
But when running a Java program (using Jsch to do sftp) using JVM, it took only 8 minutes 14 seconds to receive the same 940M file.
(More test showed that the performance of GoLang is much (5~10 times) slower than Java when running in z/OS, or send files to z/OS;
But Go is similar or has better performance than Java if running in Linux and send/receive files to/from Linux, or receive files from z/OS)
How come a compiled code is even slower than a interpreting code? And so slow? What could be the reason of the performance issue?
The text was updated successfully, but these errors were encountered: