News for hackers. Stuff that matters.
Re:How we built Uber Engineering's highest query-per-second ... by stefano on Thursday November 14, 2019 @02:34PM (#21538561)
Is that still true after tuning the JVM GC for a low memory footprint? I'm genuinely asking, I'd like to see an article on the subject. I've read in the past that the default settings are geared towards long-running processes and trade off memory usage for higher throughput, as in general there's no free lunch with GCs. Better memory usage always implies worse performance (and viceversa), just like a higher throughput increases pause times. If Go has lower memory usage and lower pause times, I'd expect it to have lower throughput than the JVM GC.
Re:How we built Uber Engineering's highest query-per-second ... by CamouflagedKiwi on Friday November 15, 2019 @08:47AM (#21544692)
Yes.

Every object in Java has something like three words of overhead; also since it doesn't have value semantics (yet) objects are typically allocated out-of-line, so an ArrayList makes a linear number of allocations, whereas a Go slice makes a constant number. Plus the binary sizes are typically much smaller; not really an expert but our observataion at work is non-trivial Java services allocate a lot of memory through classloading / JITing whereas a Go binary will typically be very small.

Basically, agreed on the GC tradeoff, but the higher memory footprint of Java mostly comes from other areas.

> Better memory usage always implies worse performance

That isn't really true. Better memory usage implies better cache-friendliness (and possibly better locality too).

Re:How we built Uber Engineering's highest query-per-second ... by DuskStar on Thursday November 14, 2019 @08:58PM (#21541604)
There's two more variables you're missing here, besides "memory" and "pause times" - how well matched to GC the language is, and how advanced/good the GC is. Some languages might just be fundamentally easier to garbage collect than others - a simple example might be that of a language with no references and no threading, where the GC is going to be extremely simple. And GC quality is certainly a thing, since I doubt major companies would spend tens/hundreds of millions of dollars producing GC 'advancements' that just move a slider back and forth.