Earlier quoted context omitted.
> That's a perfectly reasonable and human response. It's hardly a reasonable response. By casually saying that it's "sad" when a maintainer gives up on a project, GP is also including a very real and heavy implication that this is somehow wrong on their part and that they should continue to shoulder that burden, as a demand from the community. This is a really unhealthy attitude and we should all do away with it. Ins…
You don't really get to decide whether someone's entirely in-passing mention of an emotional response to developments in something they worked on is 'reasonable' or not, and more importantly, it's not at all a topic of interesting conversation, just pedantic nitpicking.
Jemalloc Postmortem
171–180 of 250 posts
Re: Jemalloc Postmortem
#172Earlier quoted context omitted.
You don't really get to decide whether someone's entirely in-passing mention of an emotional response to developments in something they worked on is 'reasonable' or not, and more importantly, it's not at all a topic of interesting conversation, just pedantic nitpicking.
[flagged]
Re: Jemalloc Postmortem
#173I understand the decision to archive the upstream repo; as of when I left Meta, we (i.e. the Jemalloc team) weren’t really in a great place to respond to all the random GitHub issues people would file (my favorite was the time someone filed an issue because our test suite didn’t pass on Itanium lol). Still, it makes me sad to see. Jemalloc is still IMO the best-performing general-purpose malloc implementation that’s…
> we (i.e. the Jemalloc team) weren’t really in a great place to respond to all the random GitHub issues people would file Why not? I mean this is complete drive-by comment, so please correct me, but there was a fully staffed team at Meta that maintained it, but was not in the best place to manage the issues?
Re: Jemalloc Postmortem
#174Earlier quoted context omitted.
Allowing SIMD instructions to be used arbitrarily in kernel actually has a fair penalty to it. I'm not sure what Linux does specifically, but: When a syscall is made, the kernel has to backup the user mode state of the thread, so it can restore it later. If any kernel code could use SIMD registers, you'll have to backup and restore that too, and those registers get big. You could easily be looking at adding a 1kb cop…
Why is that? Couldn’t there be push_simd()/pop_simd() that the syscall itself uses around its SIMD calls? If no syscalls use SIMD today, I’d think we’re starting from a safe position.
Re: Jemalloc Postmortem
#175Earlier quoted context omitted.
[flagged]
Project participants showing up to HN to discuss their work is one of the more interesting and valuable things we have here and a 'community norm' in which they start getting hectored over tiny details or pet issues unrelated to the work would not be a good one - it just drives people away.
Re: Jemalloc Postmortem
#176> jemalloc was probably booted from Rust binaries sooner than the natural course of development might have otherwise dictated. FWIW while it was a factor it was just one of a number: https://github.com/rust-lang/rust/issues/36963#issuecomment-... And jemalloc was only removed two years after that issue was opened: https://github.com/rust-lang/rust/pull/55238
Interesting that one of the factor listed in there, the hardcoded page-size on arm64, is still is an unsolved issue upstream, and that forces app developers to either ship multiple arm64 linux binaries, or drop support for some platforms. I wonder if some kind of dynamic page-size (with dynamic ftrace-style binary patching for performance?) would have been that much slower.
Re: Jemalloc Postmortem
#177Thank you. Jemalloc was recently recommended to me on some presentation about Java optimization. I wonder if you did get everything you should from the companies that use it. I mean sometimes I feel that big tech firms only use free software, never giving anything to it, so I hope you were the exception here.
Imagine being a Java developer and thinking "what have big tech corporations ever done for me?"
Re: Jemalloc Postmortem
#178All the allocators have the same issue. They largely work against a shared set of allocation APIs. Many of their users mostly engage via malloc and free. So the flow is like this: user has an allocation looking issue. Picks up $allocator. If they have an $allocator type problem then they keep using it, otherwise they use something else. There are tons of users if these allocators but many rarely engage with the devel…
malloc is bad api in general, if you want to go fast you don't rely on general purpose allocator
Re: Jemalloc Postmortem
#179Looking at all the comments and lightly browsing the source code, I'm amazed. Both at how much impact a memory allocator can make, but also how much code is involved. I'm not really sure what I expected, but somehow I expect a memory allocator to be ... smaller, simpler perhaps?
You can write a naive mark-and-sweep in an afternoon. You can write a reference counter in even less time. And for some runtimes this is fine.
But writing a generational, concurrent, moving GC takes a lot of time. But if you can achieve it, you can get amazing performance gains. Just look at recent versions of Java.
Re: Jemalloc Postmortem
#180Earlier quoted context omitted.
That seems odd though, seeing as this is one of the main criticisms of glibc's allocator.
In the containerized environments where these allocators were mainly developed, it is all but totally pointless to return memory to the kernel. You might as well keep everything your container is entitled to use, because it's not like the other containers can use it. Someone or some automatic system has written down how much memory the container is going to use.
Returning pages allows them to be used for disk cache. They can be zeroed in the background by the kernel which may save time when they're needed again, or zeroing can be avoided if the kernel uses them as the destination of a full page DMA write.
Also, returning no longer used pages helps get closer to a useful memory used measurement. Measuring memory usage is pretty difficult of course, but making the numbers a little more accurate helps.