Merge lp:~hloeung/ubuntu-repository-cache/drop-max-spare-threads into lp:ubuntu-repository-cache

Proposed by Haw Loeung
Status: Rejected
Rejected by: Haw Loeung
Proposed branch: lp:~hloeung/ubuntu-repository-cache/drop-max-spare-threads
Merge into: lp:ubuntu-repository-cache
Diff against target: 65 lines (+6/-6)
3 files modified
lib/ubuntu_repository_cache/apache.py (+1/-1)
lib/ubuntu_repository_cache/tests/test_apache.py (+4/-4)
tests/unit/test_apache.py (+1/-1)
To merge this branch: bzr merge lp:~hloeung/ubuntu-repository-cache/drop-max-spare-threads
Reviewer Review Type Date Requested Status
Canonical IS Reviewers Pending
Ubuntu Repository Cache Charmers, Canonical Pending
Review via email: mp+399560@code.launchpad.net

Commit message

Drop MaxSpareThreads - LP:1918211

We can't have too many around to allow for a server process to cycle
out. Otherwise we're back at the issue with scoreboard is full, not at
MaxRequestWorkers.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Paul Collins (pjdc) wrote :

Doesn't this make for fewer spare threads? (As the test-case updates seem to imply.)

I'd be interested to wait and see if the extra process is enough by itself.

Right now I would expect that as process A is gracefulling and marking its scoreboard entries as unusable, process B will take requests and spawn more threads if needed up to MaxSpareThreads.

Revision history for this message
Haw Loeung (hloeung) wrote :

> Doesn't this make for fewer spare threads? (As the test-case updates seem to
> imply.)

It makes it back to the no. of spare threads before the change to add an additional server process (ServerLimit 2 rather than 1). We still keep a bunch of spare threads, enough or max. for a single process.

> I'd be interested to wait and see if the extra process is enough by itself.
>
> Right now I would expect that as process A is gracefulling and marking its
> scoreboard entries as unusable, process B will take requests and spawn more
> threads if needed up to MaxSpareThreads.

Sure, marking this as WIP for the moment so we can see how the extra process is doing.

Revision history for this message
Haw Loeung (hloeung) wrote :

> > Doesn't this make for fewer spare threads? (As the test-case updates seem to
> > imply.)
>
> It makes it back to the no. of spare threads before the change to add an
> additional server process (ServerLimit 2 rather than 1). We still keep a bunch
> of spare threads, enough or max. for a single process.

That's from https://code.launchpad.net/~hloeung/ubuntu-repository-cache/extra-server-process/+merge/399536

Revision history for this message
Paul Collins (pjdc) wrote :

> > > Doesn't this make for fewer spare threads? (As the test-case updates seem
> to
> > > imply.)
> >
> > It makes it back to the no. of spare threads before the change to add an
> > additional server process (ServerLimit 2 rather than 1). We still keep a
> bunch
> > of spare threads, enough or max. for a single process.
>
> That's from https://code.launchpad.net/~hloeung/ubuntu-repository-cache/extra-
> server-process/+merge/399536

Ah, I see. Thanks!

Revision history for this message
Haw Loeung (hloeung) wrote :

Not needed now.

Unmerged revisions

333. By Haw Loeung

Drop MaxSpareThreads - LP:1918211

We can't have too many around to allow for a server process to cycle
out. Otherwise we're back at the issue with scoreboard is full, not at
MaxRequestWorkers.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/ubuntu_repository_cache/apache.py'
--- lib/ubuntu_repository_cache/apache.py 2021-03-11 23:09:11 +0000
+++ lib/ubuntu_repository_cache/apache.py 2021-03-12 03:05:02 +0000
@@ -122,7 +122,7 @@
122 config['minsparethreads'] = int(config['maxrequestworkers'] * 0.5)122 config['minsparethreads'] = int(config['maxrequestworkers'] * 0.5)
123123
124 if not config['maxsparethreads']:124 if not config['maxsparethreads']:
125 config['maxsparethreads'] = config['maxrequestworkers']125 config['maxsparethreads'] = config['minsparethreads']
126126
127 return config127 return config
128128
129129
=== modified file 'lib/ubuntu_repository_cache/tests/test_apache.py'
--- lib/ubuntu_repository_cache/tests/test_apache.py 2021-03-11 23:09:11 +0000
+++ lib/ubuntu_repository_cache/tests/test_apache.py 2021-03-12 03:05:02 +0000
@@ -39,7 +39,7 @@
39 expected = {39 expected = {
40 'startservers': 1,40 'startservers': 1,
41 'minsparethreads': 1024,41 'minsparethreads': 1024,
42 'maxsparethreads': 2048,42 'maxsparethreads': 1024,
43 'threadlimit': 1024,43 'threadlimit': 1024,
44 'threadsperchild': 1024,44 'threadsperchild': 1024,
45 'serverlimit': 2,45 'serverlimit': 2,
@@ -62,7 +62,7 @@
62 expected = {62 expected = {
63 'startservers': 1,63 'startservers': 1,
64 'minsparethreads': 1280,64 'minsparethreads': 1280,
65 'maxsparethreads': 2560,65 'maxsparethreads': 1280,
66 'threadlimit': 1280,66 'threadlimit': 1280,
67 'threadsperchild': 1280,67 'threadsperchild': 1280,
68 'serverlimit': 2,68 'serverlimit': 2,
@@ -85,7 +85,7 @@
85 expected = {85 expected = {
86 'startservers': 1,86 'startservers': 1,
87 'minsparethreads': 256,87 'minsparethreads': 256,
88 'maxsparethreads': 512,88 'maxsparethreads': 256,
89 'threadlimit': 256,89 'threadlimit': 256,
90 'threadsperchild': 256,90 'threadsperchild': 256,
91 'serverlimit': 2,91 'serverlimit': 2,
@@ -108,7 +108,7 @@
108 expected = {108 expected = {
109 'startservers': 1,109 'startservers': 1,
110 'minsparethreads': 512,110 'minsparethreads': 512,
111 'maxsparethreads': 1024,111 'maxsparethreads': 512,
112 'threadlimit': 512,112 'threadlimit': 512,
113 'threadsperchild': 512,113 'threadsperchild': 512,
114 'serverlimit': 2,114 'serverlimit': 2,
115115
=== modified file 'tests/unit/test_apache.py'
--- tests/unit/test_apache.py 2021-03-11 23:09:11 +0000
+++ tests/unit/test_apache.py 2021-03-12 03:05:02 +0000
@@ -239,7 +239,7 @@
239 {239 {
240 'maxconnectionsperchild': 10000,240 'maxconnectionsperchild': 10000,
241 'maxrequestworkers': 1024,241 'maxrequestworkers': 1024,
242 'maxsparethreads': 1024,242 'maxsparethreads': 512,
243 'minsparethreads': 512,243 'minsparethreads': 512,
244 'serverlimit': 2,244 'serverlimit': 2,
245 'startservers': 1,245 'startservers': 1,

Subscribers

People subscribed via source and target branches