Live data from Hacker News

Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

twitter.com

41–50 of 342 posts

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#41

Earlier quoted context omitted.

Just purchased my first Mac after using Linux for most of my adult life. How big of a concern is this? I am seeing mixed reports when looking around - should I be questioning my purchase if I was expecting my M1 Air to last a few years?

With a maximum memory size of 8G it's a bit anemic so you likely wouldn't get that much life out of it anyway, hope you got the 16G version. Apple is pretty good at the planned obsolescence game, so getting the larger memory would at least help stave that off for a bit. I'm skipping these for now, I run Linux on all my machines and it typically takes a while for the wrinkles to be ironed out, and x86 has much better…

All the M1 Macs can be upgraded to 16 GB, including the Air, and macOS uses memory compression by default, so there can be a bit more life to these machines than you'd otherwise expect.

Edit: Since posting this comment, the parent has been edited to include "hope you got the 16G version" -- at the time I replied, jacquesm's comment mistakenly asserted an absolute "maximum memory size of 8G."

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#42

Earlier quoted context omitted.

With a maximum memory size of 8G it's a bit anemic so you likely wouldn't get that much life out of it anyway, hope you got the 16G version. Apple is pretty good at the planned obsolescence game, so getting the larger memory would at least help stave that off for a bit. I'm skipping these for now, I run Linux on all my machines and it typically takes a while for the wrinkles to be ironed out, and x86 has much better…

It’s 16G and I just retired my 2012 MacBook Pro because I really wanted to try the M1. It was still going strong after almost a decade of use and got €300 as a trade-in. If that’s Apple‘s idea of planned obsolescence, I support their plan.

Surely you can't have that right - no one is allowed to be happy with an Apple product! Lurk moar /s

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#43

Earlier quoted context omitted.

With a maximum memory size of 8G it's a bit anemic so you likely wouldn't get that much life out of it anyway, hope you got the 16G version. Apple is pretty good at the planned obsolescence game, so getting the larger memory would at least help stave that off for a bit. I'm skipping these for now, I run Linux on all my machines and it typically takes a while for the wrinkles to be ironed out, and x86 has much better…

It’s 16G and I just retired my 2012 MacBook Pro because I really wanted to try the M1. It was still going strong after almost a decade of use and got €300 as a trade-in. If that’s Apple‘s idea of planned obsolescence, I support their plan.

Good for you :)

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#44
post #30

Does Mac have swap? If so, how does it allocate it by default?

My macos knowledge is dated (didn't use it seriously since 10.5), but it used to be a dynamically growing collection of swapfiles, usually covering all of the RAM (probably can't do that anymore).

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#45

Earlier quoted context omitted.

With a maximum memory size of 8G it's a bit anemic so you likely wouldn't get that much life out of it anyway, hope you got the 16G version. Apple is pretty good at the planned obsolescence game, so getting the larger memory would at least help stave that off for a bit. I'm skipping these for now, I run Linux on all my machines and it typically takes a while for the wrinkles to be ironed out, and x86 has much better…

All the M1 Macs can be upgraded to 16 GB, including the Air, and macOS uses memory compression by default, so there can be a bit more life to these machines than you'd otherwise expect. Edit: Since posting this comment, the parent has been edited to include "hope you got the 16G version" -- at the time I replied, jacquesm's comment mistakenly asserted an absolute "maximum memory size of 8G."

The ram is soldered onto the CPU package. How exactly does one upgrade it, short of doing hot-air rework of a dense BGA?

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#46
post #28

Earlier quoted context omitted.

As you said, mixed reports ( https://news.ycombinator.com/item?id=26244093 ) and not much followup since then. The most common worst-case numbers from that thread, if sustained, would indicate a 4-5 year maximum lifetime. If this actually turns out to be a widespread problem and Apple doesn't address it in a timely update you may see a class-action lawsuit and/or Apple warranty repair service in a few years.

Wouldn't 4 to 5 years of full-day usage be just fine for worst case life expectancy for a laptop? I've had one that gave up on 3 years, a couple months after warranty ended (that seemed to be quite common for that brand at the time).

My HP laptop is 7 years old and still works well. 4xxx i7 8 threads, 32 GB RAM, 2 TB SSD (upgrades, of course.) A new laptop with a newer CPU and NVMe would be faster but it's still subjectively fast enough for my work. I'll upgrade when it breaks down and I won't be able to repair it. I keep an eye on candidates.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#47

My first thought was that each "frame" of the GIF is being expanded/rendered to its own backingstore. GIFs are pretty optimized files — where each "frame" can be a diff from the previous. "De-diffing", converting palette-based pixels to full 24 or 32-bit RGB could really blow up fast.

From a codec perspective gifs would be the first thing that came to mind for a poorly optimized format. The only thing it has going for it is simplicity. This is a bit besides the point you're making, but I did a double take at seeing the words "gif" and "pretty optimized" together. I'm also curious as to what this has to do with M1 in particular. Looks to be like a memory allocation issue in the decoder library. But hard to tell given the amount of information given. Memory leaks tend to be boundless, but increasing, so the op statement of a fixed memory usage kinda sounds more like poorly optimized allocations, rather than non-properly-cleared up allocations. Though, could also be a mix of everything.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#48

Earlier quoted context omitted.

The latest information I have suggests it's fixed in macOS 11.4.

Do you have a link for info on this? If this is a real issue (which I still have my doubts about), Apple can’t just sweep it under the rug, after all.

It's a real issue affecting a small minority of users; I have one who has already gone through 20% of their SSD lifetime writes.

Here's one of the worse ones back in February: https://twitter.com/marcan42/status/1361847686417190918?s=19

11.4 is in beta so not many people are using it, but at least one of the folks with the issue is running it and said it improved things.

Apple were definitely made aware of it, hence why it being fixed in 11.4 makes sense, though there is no official statement that I'm aware of.

I was never able to reproduce it myself; we never found a specific trigger, but some people have the issue consistently and others (most) don't. I only managed to trigger thrashing with very blatant memory pressure (i.e. allocating most of the system capacity and continuously reading it to keep it hot), which obviously isn't what these users were doing.

People have looked at the OSX swapper code, and there were some hints that the algorithm it uses to decide to swap may have had some bugs; if 11.4 fixes it then I'm sure we'll find out once the XNU source drops and we diff it. Nobody has actually tried to root cause this outside of apple (i.e. using debug XNU builds on an affected workload/user).

Also, we never confirmed that this was an M1 exclusive issue. There's some evidence that this is a Big Sur regression that affected all Macs, it's just that the effects aren't obvious on Intel ones because the age of the SSD makes it hard to draw conclusions unless you're actively watching lifetime writes over the course of weeks. On M1s, since the machines are young, the problem is obvious with a single data point.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#50

Earlier quoted context omitted.

Just purchased my first Mac after using Linux for most of my adult life. How big of a concern is this? I am seeing mixed reports when looking around - should I be questioning my purchase if I was expecting my M1 Air to last a few years?

With a maximum memory size of 8G it's a bit anemic so you likely wouldn't get that much life out of it anyway, hope you got the 16G version. Apple is pretty good at the planned obsolescence game, so getting the larger memory would at least help stave that off for a bit. I'm skipping these for now, I run Linux on all my machines and it typically takes a while for the wrinkles to be ironed out, and x86 has much better…

> Apple is pretty good at the planned obsolescence game

Nah, they suck at it.

My GF is just finishing her bachelors thesis in the living room on my 2013 MBP with 4 GB RAM. First battery, updated all the way from Mavericks to Big Sur. Still supported, still useful and prettier than 80 % machines out there.

Post reply on HN