Jack Thomson
Jack Thomson
Setting the `number_workers` parameter when making the actix server
We should be able to scale up in number of cores really though. I've been experimenting with a multiprocessing approach
@sansyrox so far so good news, here's a demo of us sharing the same socket between multi processes. https://github.com/JackThomson2/shared_sockets
We can pass these sockets into the actix server, so we could spin up an actix server per process and share that socket between the process
But the key awesome part is we can acquire the GIL once and hold onto it as we'd have 1 worker per thread reducing overhead.
Each process has its own separate GIL which means we can have more, and as we established python is currently the bottleneck it should help ease that.
@sansyrox I have a working example here: https://github.com/JackThomson2/robyn/tree/multiprocess
@sansyrox 1. Perf wasn't as great as I was originally expecting it was only around 20% ish increase, I'll play around with the code to try and figure the bottleneck...
@sansyrox 120% of original, but I'd like that to be higher. I will look into that need to make sure that returns physical cores rather than virtual cores.
@sansyrox Ever since the updating the pyo3 in the new release performance has dropped fairly significantly. We should be catching this before releasing versions. It dropped from 27k per second,...