If you’re talking about RPi4 only then you can restrict it and the answer is rather simple: pay $10 for one GB or just $5 ?.
Hopefully you’re referring to ZRAM not tmpfs.
And zram won’t need as much RAM for the same purpose and I’d say you’re back to 2GB for the sweet spot.
Either way, the true discussion is not on which RPi4 model to buy but if to buy at all or stay with your RPi2/3 w/ 1GB. Which would be an even sweeter spot albeit not compatible with the thread title.
For one, your JVM RAM usage is awfully high, way above average. You should get well below 1GB unless you run really exotic stuff or stuff to have mem leaks.
[ although that’s something we should have another closer look at - I have a strong feeling that the changes in 2.5M2(?) make up for a serious increase in RAM demand. My own brutto RAM demand has always (up to and incl. 2.5M1) stagnated at ~700MB now it jumped to >900M
For two, the relevant column is the “RES” column which is what you’re effectively keeping in RAM. So there’s well headroom to even run zram and do it all on a 1GB machine.
No, I mean a real tmpfs. The two directories I quote are normally empty at start. There’s nothing to save off afterwards and you don’t have to worry about trashing your filesystem or your config because you powered the R-Pi off or typed reboot accidentally. Those two issues alone are enough for me to say don’t run ZRAM ever.
ZRAM would probably have an advantage with the OH internal databases. They annoy me. But not enough to take the ZRAM disadvantages.
Maybe. But I’ve already discounted the 1GB as simply not being enough. Yes it starts. Yes the JVM does run. But add in mysql for persistence (a shade over 200MB on mine), and even without the tmpfs’es you’re going to struggle (In fact mine did. And a burnt our SD is a PITA. So are the endless 500 errors you get because jersey isn’t ready for you).
Like I said previously… The JVM isn’t the only thing in RAM. You don’t want to push your buffer cache too low, or you’ll just be bound on SD IO anyway. More RAM means less physical IO (Reading or writing). And on mine it’s a shade under 2GB free, so I’d argue it’s better to go 4GB than 2GB (And the price isn’t worth worrying about anyway unless you’re planning on deploying thousands of these things)
Yeah my JVM residency is high. Is there a leak? Probably, it is Java after all. If I was concerned enough I’d drag out a copy of eclipse and start to look. Would I find the time to do that? Probably not.
I’d probably also argue that if memory or performance were a real concern you wouldn’t write OH in Java… (ducks).
Those extras above the JVM size (mysql, tmpfs, buffer cache) are what push you above the 1GB mark. I’d argue that they’re not a nice to have but a necessity.
In fact now I probably have room to push the mosquitto server onto the same host rather than having to have a separate system for it.
Would I argue for 2GB? Not for my workload… Which I consider quite light.
That’s some misunderstanding. No it doesn’t trash the filesystem, on reboot/power loss you only fall back to an earlier but consistent i.e. working filesystem state.
A little funny how touchy (correct term? I’m no native speaker) people react on this reboot thingy.
In fact it could have happened in the past as well that a ‘reboot’ could have killed consistency of one of your databases.
It ain’t apples and apples to compare tmpfs’ing those 2 dirs to zram’ing other dirs that also are heavily written to such as /var/log. Because that also means way more writes on your system and thus a higher risk of getting hit by SD wearout.
You can change zram config to only apply to exactly those two dirs, then you get 100% the same risk as with tmpfs but better performance/less RAM usage w/ zram because it compresses memory.
And if you cease using ‘reboot’ it even keeps the data across box restarts so e.g. your next OH startup will be faster because Karaf cache is available after reboot.
On RAM, I wouldn’t choose anything other than a 4 GB RPi if I was to buy a new system. The more the better, even more so if a setup already is as large as yours.
But the average thread reader’s OH setup is small enough to fit into and already is running on a 1GB system and now he’s wondering if it’s worth upgrading.
Yeah sounds I’m not doing myself a favor to convince people use it I just wanted to make clear there’s a risk because it’s new and as such not unlikely to contain bugs. I’ll reword that a little I guess.
Funny though that actually this statement does not speak of zram and all by itself has been true for many many years, well before zram was invented. Remember back times when Unices didn’t have journalling filesystems and databases weren’t transactionally safe? Too long ago I guess so people started forgetting and now type ‘reboot’ because it’s a little quicker to type than the alternatives.
I’ve been a unix engineer for 30 years now (So yeah, I remember the days - although a lot of it was AIX which has almost always had a proper filesystem)…
What (real) database were you using that wasn’t transactionally safe? sleepycat doesn’t count…
Admittedly most of my experience is not with debian… Why exactly isn’t reboot working correctly to shutdown zram properly? (I notice that if you actually look at the debian 10 (Buster) docs it says to use systemctl reboot and not shutdown or reboot…
On some systems reboot and shutdown are synonyms… I wouldn’t have thought reboot on debian was bypassing the shutdown scripts…
Oh it does as it’s still in use, even in my company. I also recall Sybase having big problems at times, then there were early versions of mysql and probably more I’ve forgotten about since.
Anyway, we’re getting off-topic, you got me … that’s what at least a moderator himself shouldn’t do
Neither have I until recently. I’m even still not 100% sure it does and what versions it applies to. But there have been reports during testing so stating this upfront means to take the safe route.
And remind you openHABian actually is in operation on various Raspbian versions and “real” server HW (SSD or HDD, lots of RAM) where this problem might exist, too, but (eventually) does not show up.
Yes, only the aeotec z-stick gen5 has a problem (known) that it is recognized as a USB 3.0 device. However, only USB 2.0 is supported by the stick. By a USB2.0 HUB you can regulate the topic but
I use a Geekworm X825 to integrate the SSD, but the micro SD card is still needed for the boot process,
Any Pi 2 or later provides way sufficient performance to run OH, so no, you could measure but you do hardly notice any improvements, and if so they’re not of relevance. Sufficient is sufficient.
Sorry to jump in as moderator, but this is another useless XY problem question that we dislike to see here: why do you want to know?
Either you have no HW so far then it’s easy: go buy a 4. Or you have some older HW then it’s easy, too: stay with it.
Someone asked what is a pretty decent question “is there a performance improvement” - it’s a free chat.
A forum needs to have a “friendly” feel to it where people can ask a question and not get flamed for it.
The balancing act is trying to point out that you need more info to help someone and just pointing them to a “rant” on how to ask a better question.
To pull the I’m a mod line is interesting when viewed against the balance idea above.