Disable chunk uploads for the sync rpm upload endpoint to improve performance on console#1306
Disable chunk uploads for the sync rpm upload endpoint to improve performance on console#1306
Conversation
57cc4fa to
a2e03d3
Compare
|
@mdellweg can you re-run the tests? It's failing again on a random place. I can't do it myself |
|
@YasenT I just re-ran the tests. Could you please add a changelog entry, since this changes the functionality? |
|
Yes, we should have the tests pass. But it's only necessary once we have established there's no pending change anymore. We are working on the random test failures. |
a2e03d3 to
683be58
Compare
683be58 to
a1361cb
Compare
Added a changelog |
Anything else you would like changed? :) |
a1361cb to
2f33fcc
Compare
2f33fcc to
7fe4eb4
Compare
|
@YasenT Any reason why Gerrod is marked as the commit author? I am guessing this was by accident. |
|
Before I will comment more about the excessive comments still left, let me try to understand what this change is all about. When you have a huge file, it always used to be chunked up. Now with this change it will always not be chunked up, thereby running into the exact server limits the chunking was invented for in the first place. And for that you take away the user control over the chunk size. Couldn't you instead just tell the user to increase the chunk size? Isn't this a docs issue in the first place? Do we need a globally configurable chunk_size default? |
|
@mdellweg As for the chunking -> the default behavior actually doesn't change. It will still chunk at default 1MB, and people can set the chunk size if they want to. |
e148c8d to
b7cf6f4
Compare
There was a problem hiding this comment.
My last comment wasn't even about the comments, but about the fact that the command has a chunk_size (probably with a badly chosen default) that your changes just silently start to ignore. My point is that even in the face of the upload endpoint, there is a limit to the size of file you can upload in one go.
So my specific question here is, should we make the chunk_size globally configurable?
On the chunk size, I think that the default value should be dynamic and based off the size of the file being uploaded. But my changes aren't affecting the default behavior/flow that users are used to with the async endpoint. The changes affect just the synchronous one, which wasn't available through the pulp-cli till recently. And there the target is to reduce the tasking/load on the server side. |
|
The chunksize is there to reflect a limitation of the server, and therefore no, it does not depend on the file, but on the server you upload to. Your change trades possible failure for some performance improvements in a way that leaves the user no way to react. So I come back to my original question: What is a good default chunksize and should we make it a per server setting? |
|
@mdellweg the chunk uploads are causing issues as is. Which is actually turning it into a guess game for the end user - is it enough to set 20M, 60M, etc. |
Yes, sadly it's a guessing game if the user does not have access to the very nginx/apache configuration. Certainly they cannot simply adjust that setting, therefore we cannot just skip chunking for infinitely large files.
This is about what is the best solution for most users that at the same time does not prevent any user from uploading a file that they could upload before. Also it's not about the api-endpoint. The user of this library is deliberately abstracted away from the api. That's why there is some heuristic to determine how to accomplish the task promised to the user. So if I understand your suggestion correctly, we would allow the chunk size to be unspecified (reading that as infinity), and instead of finding a proper default value drop it completely. |
|
How about we do this:
I can take adding the settings aspect of this later. |
01f5aa1 to
5e108f1
Compare
5e108f1 to
86cf084
Compare
|
@mdellweg I hope I understood you correctly, and made the change global. |
Disable chunk uploads
And retrigger tests to see if it fails at same place. As I see that the nighties run just fine