4 ms·
Single core only :(
by devxpy 8y ago
Single core only :(
- btown 8y agoIf you need multicore performance, you likely will soon need multi-server performance, in which case you can either use multiprocessing or even containerization to run one gevent “hub” on each core across a cluster. Compared to threads, the memory overhead is minimal.
- _asummers 8y agoGoing from single node to multi core doesn't introduce nearly the amount of complexity that making a distributed system does. Recommending that for someone who wants to use more than 1 core on their machine is not a reasonable recommendation. You're not wrong that you might wind up there, at the end, but doing that for the first step is too heavy unless you have a runtime to support those complexities more easily, as in e.g. BEAM.
- devxpy 8y agoRunning one gevent hub per core seems viable. Does it support forking? Also I don't think that gevent does preemptive switching. I can already do multi server just fine, but not everything is in the server domain. Also I don't seek multi-core usage for performance, specifically. Versatility is what I'm going for here. An Erlang like system can be both performant and scalable to thousands of clients. The current scope of python really only allows for either one. You can go either multiprocessing, which will give great processing power, but you can only launch so many of them. You can go asyncio route and launch millions of coroutines, but they suffer from performance issues.