Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Jemalloc 5.4.0(github.com/jemalloc ↗)
    39comments
  2. The scourge of x86 emulation(fex-emu.com ↗)
    24comments
  3. OpenJev(openjev.com ↗)
    1comments
  4. Astra for Law(openai.com ↗)
    546comments
  5. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    131comments
  6. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    219comments
  7. Qwen 3.8 Omni Flash(qwen.ai ↗)
    80comments
  8. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    169comments
  9. When the fractional part of a float fixes your shader(crocidb.com ↗)
    1comments
  10. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    34comments
  11. Wax motor(wikipedia.org ↗)
    70comments
  12. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    231comments
  13. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    153comments
  14. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)(byteshape.com ↗)
    11comments
  15. Replacing Pull Requests with Delta(zed.dev ↗)
    2comments
  16. How to Write with an LLM(sockpuppet.org ↗)
    96comments
  17. Speeding up gearhash on ARM64(sam.dev ↗)
    discuss
  18. Ask A Monk – A digital wilderness for thoughts with no immediate answer(askamonk.online ↗)
    23comments
  19. Why Does the Universe Expand?(cosmicave.org ↗)
    53comments
  20. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    56comments
  21. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    24comments
  22. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    41comments
  23. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    368comments
  24. How do we prevent mathemathics from devolving into the Medieval Era of secrecy?(mathoverflow.net ↗)
    106comments
  25. Microsoft exec called AI scraping 'the largest theft of labor in human history'(techcrunch.com ↗)
    1comments
  26. CrowdSec Source Code Leak(crowdsec.net ↗)
    48comments
  27. The most important product decision is what you don't build(liamnugent.me ↗)
    38comments
  28. Apple detectives solved mystery of ancient tree and rewrote the history of fruit(scientificamerican.com ↗)
    10comments
  29. Fixing an NZXT Signal 4K30 part 2: the green/pink video bug(downtowndougbrown.com ↗)
    10comments
  30. Infinite-Parameter LLMs: Generating and Adapting Weights from Live Data(arxiv.org ↗)
    39comments

Jemalloc 5.4.0

146 pointsby 5h agogithub.com
39 comments
4h agoHN ↗

Why is this on the HN front page? Is there something particularly noteworthy about this release?

3h agoHN ↗

They resumed development on jemalloc only recently, after years of no releases.

1h agoHN ↗

Development was never stopped for jemalloc. This is a common misconception. There just were not releases being tagged and packaged against the ongoing development.

3h agoHN ↗

I just checked whether it's the first release after Jason Evans stepped down as maintainer, but it isn't. That was the previous release, 5.3.1

3h agoHN ↗

jemalloc is something you should be aware of if you do software for a living

2h agoHN ↗

Why? Writing a memory allocator is quite simple, and I'd argue that _everyone_ should write one from scratch for any kind of high performance application. It's also trivial to outperform general purpose allocators that have to satisfy countless constraints. I've written numerous special purpose mallocs that are a) both provably (formally) safer than the standard armada and b) significantly faster (>10x throughput).

2h agoHN ↗

Your experience writing memory allocators is irrelevant. The point is that jemalloc is widely used and that’s why it makes sense to be aware of it.

2h agoHN ↗

I'd happily see performance, latency and stability of your allocators in massively multithreaded, long-living programs with workloads where hundreds or thousands of parallel threads continuously create and destroy short-lived small and medium objects.

Writing allocators for domain-specific access patterns is easy. Writing a general-purpose high performing, stable allocator with bounded P99 latency is hard.

Give your friend, Dunning–Kruger, some better pills to keep him from speaking through you.

2h agoHN ↗

You're correct, but his point is that you don't need to solve the generic problem. Solving the generic problem is very hard. Grug doesn't like solving hard problem. What does grug do? Solve five easy problems. Make an arena for the short-lived objects, reuse the objects, use generic multithreaded malloc for the rest. Grug happy.

1h agoHN ↗

Not everything needs to be general purpose. Allocation can be as easy as bumping a pointer, and it's hard to beat that.

5m agoHN ↗

where hundreds or thousands of parallel threads continuously create and destroy short-lived small and medium objects.

Should one even want a global, general purpose heap allocator for that? Seems like a crazy idea to even consider.

2h agoHN ↗

Writing an allocator is simple, you’re correct, but writing an allocator that doesn’t suck is not simple.

2h agoHN ↗

In the Before Times, the vast majority of software was written in garbage collected language where a working knowledge of the relative merits of C memory allocators is not useful or particularly relevant.

Why would the scads of people writing JavaScript, Java, python, go, rails, etc need to be aware of jemalloc?

2h agoHN ↗

TL;DR: Because the runtime of most GC:d languages uses malloc for its internal data structures.

I work for the runtime team of JPG @ Oracle. We use malloc in Hotspot, quite a lot actually! Providing your JVM with a good malloc can improve the performance of the runtime, both in terms of CPU and memory, by quite a bit.

I don't think you need the details, but it's good to be aware that some mallocs are better than others, and there are multiple of them. Being aware of jemalloc is a good way of being aware of the facts I just mentioned :-).

1h agoHN ↗

...the vast majority of software was written in garbage collected language

and even then recently it costed (us) quite a few months to blame JVM and later the default glibc memory allocator for running out native (java heap memory) - had to exclude all possible native libs, direct buffers, sockets, thread stacks and so on. Changing the malloc to jemalloc solved the issue, even though initially it was done for its debugging capabilities.

It's just a great memory allocator.

32m agoHN ↗

I'm never sure if I should be upset or happy when I've been debugging a problem for long enough that I finally decide to switch something out in order to improve visibility and that immediately solves the problem for entirely unexpected reasons. Particularly all the times when I couldn't readily discern why.

1h agoHN ↗

Memory allocation behaviour has visible impact also for users of managed languages, and the behaviour of software for end users.

In our Python program, a bit of numpy processing of large pictures led to 100 GB not being returned to the OS by glibc's default allocator and the machine running out of memory shortly after. With jemalloc's reliable memory return settings, those problems disappear.

2h agoHN ↗

I upvoted it because I benefit from jemalloc in my stack (RoR) and I am tired of AI taking over HN front page. Let the hacker spirit be back!

1h agoHN ↗

Upvoted for the same reason. We would not be able to run our workloads without Jemalloc. Kudos to this awesome piece of software.

1h agoHN ↗

You are not alone - my first thought was 'oh, HN is trying to bring back the disappointed hackers'. All this AI hype over every little model update fart is so exhausting and boring …

1h agoHN ↗

because people like you are too busy whining about it to put up something more interesting

56m agoHN ↗

Why is this on the HN front page?

This question was not necessary. You know the answer, because people upvoted this.

2h agoHN ↗

I always wondered, is it French? "Je m'alloc du memory"

2h agoHN ↗

Rather a tradition to call a malloc by the initials of the implementer: Jason Evans malloc (jemalloc), Poul-Henning Kamp malloc (phkmalloc), Doug Lea (dlmalloc).

P.S. I also wondered whether systemd had any cultural reference to Système D aka Système Débrouillard, but Pottering does not seem to engage in word play on other occasions, so probably not.

1h agoHN ↗

damn i always thought it was a french thing, this is blowing my mind

1h agoHN ↗

"Yes, it is written systemd, not system D or System D, or even SystemD. And it isn't system d either. Why? Because it's a system daemon, and under Unix/Linux those are in lower case, and get suffixed with a lower case d."

Source: https://brand.systemd.io/

1h agoHN ↗

Thanks, now my brain will forever read it like that. I'm not even a little bit French.

33m agoHN ↗

Fun grammatical fact that I only learned after years of speaking French: when borrowing words from other languages, you usually (not always) take the gender of the equivalent word in French, so technically it would be “de la memory” :)

16m agoHN ↗

That's the rule the old geezers at the Academy insist on. But then you have idiotic situations where everyone is using "le" for e.g. the COVID virus, while Academicians cry about the D meaning "Disease", which is feminine, making it "la COVID" in their book. As for all languages, the most important rule is that usage prevails. And that's something we in France still have a hard time integrating into public discourse.

1h agoHN ↗

Ok. Why both the homepage and its Github repo doesn't make a single mention of Jason Evans? I know he stepped down but surely it is at least worst mentioning it?

Is Meta still using it and developing it? If not who are the driving force behind it now? I just checked there wasn't a release since 2022 and then we have this now. Something changed?

Just wish we have a little bit of context. But it is also great it is continue being maintained. It makes a huge difference for Ruby on Rails Apps.

1h agoHN ↗

Just wish we have a little bit of context

See the comment of vocx2tx

1h agoHN ↗

does anyone familiar with the art have thoughts on why only tcmalloc switched from thread caches to cpu caches? would it make linux behavior diverge too much from other platforms?

59m agoHN ↗

I think tcmalloc gains on thread churn and oversubscription by going the cpu-cache route on Linux. on other platforms, I am not so sure but that can be offset by say a treiber-stack like setup for cross-thread frees/teardowns. So lesser code for Linux for similar fastpath design I guess.

56m agoHN ↗

(Not an expert but ...) unless you pin threads to cores, which is not the default and somewhat awkward in Linux for user applications, having a per-thread cache doesn't really make sense as your thread could be moved to another core and then your cache will no longer be local to the physical cache.

23m agoHN ↗

I switched to jemalloc on a sidekiq queue and memory dropped from 8gib to under 1gib

There’s a slow memory leak somewhere in my code but with jemalloc it no longer actually matters.

Thanks to jemalloc team for this!