54 ms·
Work items in my case are packets from the network. There's not much I can do to batch them; perhaps increase socket buffer sizes, but that comes with its own
by clarry 7y ago
Work items in my case are packets from the network. There's not much I can do to batch them; perhaps increase socket buffer sizes, but that comes with its own problems, and doesn't help when the peer is waiting for a response instead of flooding more packets in.
- dragontamer 7y agoInstead of 16x consumer threads serving 16x producer threads, you probably would be more efficient with 8x consumer threads serving 24x producer threads. Or some other asymetrical arrangement. Its the classic "latency vs throughput" tradeoff, you decide that higher-latency is acceptable to increase throughput. Or you don't make that decision. For some people, latency is more important. It really depends on your specific situation. Async architectures seem to scale better. So maybe its worth looking into async instead of blocking to avoid task-switching.