Hacker News new | ask | show | jobs
by Nextgrid 1254 days ago
> More than a dozen chrome tabs and a few discord servers has been enough to crash/significantly slow down my m1 Mac mini

On the other hand, maybe there should be pushback against shitty inefficient software?

I remember a decade ago being able to have a dozen browser tabs and instant messaging clients on 4GB of RAM just fine, and neither the web nor instant messaging experience has changed significantly enough to warrant the extra memory consumption (the majority of today's day-to-day browser-based tasks have been done just fine in 2010 on that era's hardware).

10 comments

> On the other hand, maybe there should be pushback against shitty inefficient software?

How would that work? You whine on an online forum over how bloated a software is, and in the process opt to be deprived of it's usage? Or would you continue to complain about bloated software while using it? Because none of those scenarios offer a compelling reason for the software maintainers to rearchitect their whole application.

Meanwhile, a 8GB stick of RAM can be bought for what? 40€?

Way fucking cheaper than 40. Closer to $16 unless you really need DDR5. Even then, it's still around $29/8gb if buying 32gb or more.

The issue is that Apple is integrating the RAM in the SoC. Personally, I'm not really a fan of "smart-phonification" of my desktop computers.

I get that the mini is in a bit of a weird spot, since it's still got fairly challenging size constraints, but still... not my cup of tea.

> The issue is that Apple is integrating the RAM in the SoC

Aren't there legitimate technical reasons for including the RAM in the SoC such as better bandwidth?

The integration into the SoC is partially responsible for the amazing performance. The extra travelling distance for a click-in ram stick adds up, in terms of latency, quickly
Not really less latency so much as the signalling can be run at much higher speed and/or much lower power without having to worry about stuff like the optional termination, the electrical properties of the socket->dimm connection itself, and much shorter track lengths. It also allows you to have as wide a bus as you want, limited by cost of packaging and die sizes on the package, instead of dimm size and board layout, which naturally has a much higher trace pitch than the package.

The higher speed "may" cause lower latency, but it's likely secondary at best.

Memory latency on the M1/M2 is no better than other systems. Other things are better, but not that.
The memory bandwidth is a hell of a lot better than that $16 8GB stick mentioned upthread, though. 100GB/s on the M2 or 200GB/s on the M2 Pro. It may be possible to find actual comps with similar performance at a much lower price than Apple charges, but that $16 stick ain't it, or even close.
That should happen in the future, but so far Apple hasn't really taken advantage of the massive improvement in signal integrity and their latency is similar to desktop x86. If someone figures out how to overclock one of these machines, we can find out if they're just being extremely conservative or if the memory controller is extremely weak compared to what you see on x86 desktop CPUs.
Intel minis have upgradeable memory and their internals took up way more space compared to the (old) m1 mac mini at least.
Not saying you're wrong but specifically to address OP's memory usage issue when running over dozen tabs in Chrome, I'd suggest testing it against Firefox for start. I'm not proud of this bad habit, but I have an order of magnitude more tabs than that with FF running on a pre-M1 8GB Macbook and it's pretty great most of the time. I use Chrome mostly for development but wouldn't dream of keeping it running as many tabs as I have open on FF (perhaps that's a good thing if I want to get rid of my tab hoarding habits now that I think about it.).
Maybe because Firefox automatically suspends old tabs, Chrome needs a extension for that. If you reopen FF it reloads only the tabs you actually visit.
FYI Chrome is trialing that feature natively titled "Memory Saver". It's available in my laptop's settings, but currently still not in my desktop's.
"Meanwhile, a 8GB stick of RAM can be bought for what? 40€? "

Ha! Not if you want to get it in your MacMini. 8GB will set you back $200!

The Apple Cult has gone all in...

What's the memory bandwidth on the 40€ stick? Apple charges a premium most of the time, sure, but there's a loooong tradition of the loudest voices complaining about the so-called Apple Tax also failing to actually compare like-to-like when drawing their conclusions about e.g. "The Apple Cult".
Interesting, how are you planning on adding those extra 8 gigabytes if RAM to an M1/M2 Mac? Do you know of a mod that will make the motherboard take DIMM slots?
Simple, you don’t use Chrome and use the bundled browser that is much more power and memory efficient
> Meanwhile, a 8GB stick of RAM can be bought for what? 40€?

I think the M2 chips use on-chip LPDDR5. is it a 6400MT/s LPDDR5 stick for that price or a 2133 MT/s SO-DIMM?

Yeah, people have been making the argument about inefficient software for about 4 decades now.

I remember a decade ago buying a 16GB Mac Book Pro, and listening to people complain that 8GB wasn’t enough, so I’m not sure what world 4GB was enough.

That same 16GB laptop still works great today.

A few years back I was given an old 4GB Macbook to use temporarily when I started at a new job. Thing is, I could have kept using it indefinitely for the actual work, for which it didn't feel slow—but Slack (Electron) and Asana (project management... webapp, thing, that liked to eat tons of memory & cycles for no reason, at the time) were must-use tools and just having them open with nothing else brought that poor machine to its knees.

Cut out webapps/Electron and it was entirely fine, though. Like if we'd just used XMPP or something instead of Slack I might even have been able to make it work without serious issues

I had an employer hand me a macbook with a small HDD (not SSD) with 4GB or 8GB of RAM. It was incredibly slow, especially with slack. It's somewhat symbolic of why I'm glad I don't work there anymore.
Get ready for AR apps written in react native. The reason we have shitty inefficient software is because Apple, Google, and Microsoft haven't standardized on a performant cross platform framework other than the browser. Don't blame people writing software for not wanting to waste their lives translating the same logic to 3 different platforms and then maintaining 3x the code for the rest of their lives.
> Don't blame people writing software for not wanting to waste their lives translating the same logic to 3 different platforms and then maintaining 3x the code for the rest of their lives.

If you decouple your UI from your business logic, then you only have to re-write the UI. If you must use a web-based UI, then consider using the platforms native browser control rather than bundling electron.

Ok, you decouple UI from business logic, have some state machine written in language X let's say that can compile ios, android, and wasm and allows for interop with the kotlin, swift, and js. Even then, the view code is often the most complex and bug prone part of the app. Business logic is easy by comparison (in my opinion).
Electron itself is not really that bad though. Sure there is not insignificant overhead but you can still make fairly resource efficient apps with it if you actually want to (and you can use Tauri if you want to go even further).

Also Slack, Discord etc. are not really using React Native (but rather normal web react if they are not using another framework). You don't really need Chromium for React Native which significantly reduces memory footpring (in fact a react native app can be close to indistinguishable from a "normal" native app in most ways). You can probably reduce React Native overhead to not much more than 100-200MB compared to purely native apps which seems reasonable.

I was just using the original poster's language when I was referring to "shitty inefficient software". I'll say it does bother me that we are standardizing on typescript with react being the default for cross platform development.

When I first started using react I loved it compared to what existed at the time, the ease of composing everything and the fact that it just used JS instead of a DSL for templating and it didn't mandate all these cargo-culted framework patterns.

But the warts are really starting to show up, writing React today with useEffect hooks everywhere reminds me of writing VHDL in college to simulate an automated train controller and now I'm reaching for things like XState to handle almost all state management (I have a feeling this complexity ends up appearing for all complex UI interactions though).

Also we are taking on a type system (which is good) but not seeing any of the performance benefits that could bring. Why is golang more than 100% faster than typescript? Both are statically typed languages but TS doesn't get any compiler optimizations because of the JS baggage.

That being said, I'll take JS with React + React Native if it means I can write apps once and ship to all three major platforms. It's exciting that ui frameworks like Tamagui allow for close to 90% code sharing.

So exactly how do you create a performant cross platform framework that takes advantage of all the platforms features? What happens when one of them create a new feature for their operating system?

When has there ever been a performant cross platform framework?

The abstraction doesn't have to be perfect. Most apps don't even take advantage of native platform functionality.
So now you’re going to have half assed cross platform products that you still have to have a bunch of #if ios preprocessing statements and won’t take advantage of the native features.

As a developer you will always have applications that are behind and have to wait on the third party.

This has been the case with every cross platform framework ever. See also JNI.

Nothing's perfect and often when there are platform inconsistencies like that someone abstracts the functionality away in a package so the application developer doesn't need to worry about it. I'd rather have 80% code sharing across platforms than no code sharing.
Have you ever done GUI development of a large app that was meant to be cross platform using Java?

What happens when it isn’t just an inconsistency. But a feature doesn’t exist at all? They have different number of parameters?

How do you handle the different permission models?

The apps are never as good. You still will have just as many shitty half assed apps as you have today with Electron.

Both Google and Facebook have both decided that cross platform apps weren’t good enough.

https://blog.xojo.com/2021/10/12/google-switches-to-native-o...

THIS
You're being downvoted because upvoting is the desired alternative to THIS spam...
> On the other hand, maybe there should be pushback against shitty inefficient software?

I think that war has been lost. Apple should just allow more RAM to be put in.

I’m using a M1 and it is very performant with Brave and unlock origin with only 8gb ram and XCode opening in the background. I try to stay away from Discord and Slack on the desktop as years ago they would cause my system to slow down
> very performant with Brave

To add to that, my 8GB "late 2014" Mac Mini is very performant with (the modern) Linux on it. (It was barely usable running a recent MacOS.)

> On the other hand, maybe there should be pushback against shitty inefficient software?

Agreed. Some might say "RAM is cheap" but that line of thinking is why one day 64GB RAM won't be enough for a dozen browser tabs.

What was the resolution a decade ago? Just having the Web in 4K is going to require significantly more memory. And something like Discord is not exactly comparable to an IRC client.
A lot of Discord’s memory usage is because it uses Electron/embedded Chromium. I agree that it does a lot more then IRC clients do, but I think it uses a lot more resources and is a lot less snappy then a native app.
"no one needs more than 640k of ram"
Well it seems like for more than a decade, Apple seemed to think that nobody really needed more that 8GB of ram.
Apple offering 16GB is a clear counterexample to that. We can only say that Apple feels 8GB is enough for a significant fraction of users...
I think it's much more related to market segmentation and upselling. If they started shipping 16GB in the base model they'd probably have to price it closer to the current price of the 8GB one than to the 16GB to stay competitive.

8GB is probably enough for most users in most cases currently (not necessarily in a couple of years, which means they'd update earlier) but the cost for adding 8GB would be pretty low for Apple.

I have a Mac Mini from around 2010 that I saved from the recyclers recently. Dusted it off, put in 8GB of RAM and an SSD, and it booted up Windows 11 just fine. However, as far as I can tell there is no up to date MacOS available for it because Apple considers such a thing too obsolete to support.
You might be able to install latest macOS using OpenCore-Patcher (it's just bootloader IIRC it does not modify the OS itself in anyway so it should be pretty safe). I've used it on 2011ish 17" mbp and had no issues.
Thanks, I'll take a look at that. Next thing I was going to try was host a VM under Linux and see if I could make a "hackintosh" on real Apple hardware.
Actually, my M1 never uses the 16gb (8 at most), even though I have several IDEs running (also browser of course). I'm not sure what generate such memory consumption for some users.
Running IDEA, a Java backend, a nodejs frontend, a secondary nodejs frontend and a browser with dev tools open has caused my computer to hit 32GiB of RAM usage easily. I didn't decide the tech stack, unfortunately, but this has become a real problem.

Personally I think 8GiB should be more than enough for any normal end user though the Electronification is taking a real toll these days. However, this is the M2 Pro, labeled for professionals, and professionals generally need more resources. Capping the machine at 32GiB means I can't even comfortably run my current stack without swapping. I can only imagine what this will do do professional video/photo editing.

my M1 with 64GB is pushed to its limits from time to time. Running a couple of vms and database servers for local development takes up a lot of memory.

Like always, it depends on your usecase. For some 4GB will be enough, for some it wont.

Full stack software development (background servers, database, redis, often under Docker).