fix(MemcachedFactory): Enable TCP_NODELAY and adjust default timeouts to be reasonable - #62670
Conversation
… to be reasonable Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
|
/backport to stable34 |
|
/backport to stable33 |
|
/backport to stable32 |
|
/backport to stable31 |
|
/backport to stable30 |
|
/backport to stable29 |
|
Backport down to stable29 happens to stabilize CI runs on GitHub. Previous branches don't have the memcached PHPUnit tests using GitHub Actions. |
There was a problem hiding this comment.
Thanks for picking up that ancient ticket, seems reasonable to adjust the limits 👍
nit: Using the class name as scope is not ideal. The scope is meant to describe the area/module/subsystem affected. Hence I would suggest cache or memcache. Which files are changed are visible from the diff already, no need to repeat that in the commit message.
|
The backport to # Switch to the target branch and update it
git checkout stable29
git pull origin stable29
# Create the new backport branch
git checkout -b backport/62670/stable29
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 308240aa
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/62670/stable29Error: Failed to check for changes with origin/stable29: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
The backport to # Switch to the target branch and update it
git checkout stable30
git pull origin stable30
# Create the new backport branch
git checkout -b backport/62670/stable30
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 308240aa
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/62670/stable30Error: Failed to check for changes with origin/stable30: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
The backport to # Switch to the target branch and update it
git checkout stable31
git pull origin stable31
# Create the new backport branch
git checkout -b backport/62670/stable31
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 308240aa
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/62670/stable31Error: Failed to check for changes with origin/stable31: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
The backport to # Switch to the target branch and update it
git checkout stable32
git pull origin stable32
# Create the new backport branch
git checkout -b backport/62670/stable32
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 308240aa
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/62670/stable32Error: Failed to check for changes with origin/stable32: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
The backport to # Switch to the target branch and update it
git checkout stable33
git pull origin stable33
# Create the new backport branch
git checkout -b backport/62670/stable33
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 308240aa
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/62670/stable33Error: Failed to check for changes with origin/stable33: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
The backport to # Switch to the target branch and update it
git checkout stable34
git pull origin stable34
# Create the new backport branch
git checkout -b backport/62670/stable34
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 308240aa
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/62670/stable34Error: Failed to check for changes with origin/stable34: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
Summary
The CI tests against
memcachedfail sporadically. After some research, it's because the default timeouts are way to low for high load scenarios. The ones being used at the moment have no reasoning behind them at all (we use these ones according to the commit message here). This is being mentioned in #14995 and can be observed when comparing our values with those of other PHP applications as well:POLL_TIMEOUTand 4 seconds forCONNECT_TIMEOUTapplyFor our CI tests, the
POLL_TIMEOUTis the one that makes the tests fail. As we're not enablingTCP_NODELAYat the moment, the bare minimum ACK time for small packages (like aHIT MISSwith binary protocol) is 40ms with the default Linux kernel settings. Dangerously close to the 50ms timeout we currently use. Under high load scenarios, the kernel can increase the ACK time to up to 200ms and the RFC even allows up to 500ms.That's why this PR enabled
TCP_NODELAYto speed upHIT MISSscenarios (same as Symfony does, which seem reasonable as well) and adjusts the default timeouts to those being used by MediaWiki as they seem pretty reasonable.Checklist
3. to review, feature component)stable32)AI (if applicable)