-
Notifications
You must be signed in to change notification settings - Fork 2k
[aiohttp] - lower connection pool value #9935
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
[aiohttp] - lower connection pool value #9935
Conversation
|
@Dreamsorcerer I am not 💯 percent sure, but 1800 connections looks to high number for table with only 10000 rows. This change should speed up the update at least, but I am not sure will it hurt the read performance or not. |
|
Interesting, I've no idea... |
Yeah, for the last update test So, for example release with 3, after with |
You said there was 56 CPUs, so there'd be 32 connections per process. So, you're currently reducing it from 32 -> 3. |
|
Yes, correct. I suppose I even must decrease to 2 instead... From this article here is test env https://www.techempower.com/benchmarks/#section=environment
From postgres suggestion
so in our case it will be 56*2 suggested total number of connections, effective_spindle_count=0 since all data is cached. we should have pool size set to 2, as per recommendation. |
|
Local testing is not relevant since both database, application, test suite are sharing the same resources. Pool size = 2queriesupdatesPool size = 3queriesupdatePool size = 10queriesupdatesOriginal (160) since I have 8 coresmax_size = min(1800 / multiprocessing.cpu_count(), 160) queriesupdates |
|
FYI, we may also see a performance increase from new releases of multidict, yarl etc. We realised there's a performance hit in the pre-built wheels that is going to be fixed shortly. |

We should balance connection count carefully: