3 ms·
In the throughput graph, why does Haxl perform worse in the 3 most common request types?
by covi 11y ago
In the throughput graph, why does Haxl perform worse in the 3 most common request types?
- Periodic 11y agoI don't think the graph says which request types are more or less common. The ordering could be arbitrary. It would be interesting to know why some are slower. Perhaps they require very little processing and so the time becomes dominated by FFI transformations? It would be nice to know!
- Filligree 11y agoIn fact, it appears to be ordered by performance. There's no other reason I can think of for that appearance.
- JonCoens 11y agoOne of the cases we found while performance profiling was a tradeoff between memory usage and computation completion. On certain requests FXL would use too much memory and be halted by the equivalent to AllocationLimits, while Haxl would happily plow on using less memory and complete the request. When looking at many of those requests in aggregate, the end result would have more successfully completed requests but with longer response times mixed in. Completing more requests was seen as a win over the apparent decrease in throughput.
- simonmar 11y agoThe graph is sorted by performance, with the worst performing (not necessarily the most common) on the left. We've also done more profiling and optimisation since we took those measurements. FXL employed some tricks that were sometimes beneficial, but often weren't - for example it memoized much more aggressively than we do in Haskell. Mostly that's a loss, but just occasionally it's a win. When a profile shows up one of these cases, we can squash it by fixing the original code. What matters most is overall throughput for the typical workload, and we win comfortably there.