Рет қаралды 1,896
Fastly uses Go extensively in our logging systems. The hosts that handle these logs typically have 128 Cores and 1TB of memory and handle around 1M logs per second. Channels are used extensively in this code, however on these high CPU count hosts there is some unexpected behavior which can cause significant performance bottlenecks. Hitting this bottleneck on a production workload is not fun- customers want their logs now, not later. Building on the channel speed analysis done by Phil Pearl we found that a high core count host’s channel performance could be 10 times slower than low core count machines. This is especially relevant if bottlenecks exist where large parts of the data eventually flow through a single channel.The combination of the high CPU count and high throughput per channel pose some interesting possibilities for solutions as the two factors are interlinked. A number of solutions to this problem exist, however there is no panacea. Batching channels, parallelizing workflows and buffering were all investigated.