-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Increase max read #16946
Increase max read #16946
Conversation
Thank you 👍 Mind to sign off your commits? https://github.com/nextcloud/server/pull/16946/checks?check_run_id=208487803 for more information. |
So I actually tried this and for me it made no difference. As the files are read in 8kb chunks anyways (php internals). did you change other things as well? |
I guess thats kinda the point. You shouldn't notice a difference. In my set up this stopped bandwidth by a huge amount. I only looked at this being an issue because of the huge bandwidth usage on my server. This fixed it for me |
@exussum12 I meant that I still saw 8k reads originating from php 😉 as that is one of the internal constants. I'll dive a bit deeper. |
Have you got a link to that source? I did take a look but didn't find it. I imagine its there in the context of IP packets and not disk read bytes as many disks actually have larger block sizes than this also now. (Though this effect will be much less noticeable on a disk itself ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me otherwise
Mmm I can only trigger it in docker on old php versions. |
@exussum12 could you change the chunkSize to 512 kB (524288) as requested and rebase the branch with the latest changes from master? Thanks 👍 |
2080f87
to
79fa714
Compare
Thanks @exussum12 👍 CI looks good. I restarted the Job because some timeouts. |
Hey @exussum12, mind to do another rebase? |
8kb is very low, especially given this will be local files Signed-off-by: Scott Dutton <scott@exussum.co.uk>
rebased @kesselb |
lib/private/Files/View.php
Outdated
@@ -423,7 +423,7 @@ public function readfile($path) { | |||
@ob_end_clean(); | |||
$handle = $this->fopen($path, 'rb'); | |||
if ($handle) { | |||
$chunkSize = 8192; // 8 kB chunks | |||
$chunkSize = 512000; // 500 kB chunks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be 524288 as per #16946 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry. I think I rebased from a commit without this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
The lint check is failing on lines I've not touched ? |
yeah not your fault. new linter |
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
8kb is very low, especially given this will be local files. a fix for #16945