You are not logged in.
@John-san, sorry fellow nixer, in my view you are in fact a very knowledgeable, skilled and experienced nixer overall. Just that this situation irritates me. It's gnu/Nix as such more than one way to skin cats. Perhaps debate adding this as an option in the bl-welcome deal ? Then all parties are happy ? It's a matter of echo'ing one friggin line to sysctl.conf afterall.
Apologize my friend, I got carried away here.
Offline
More babble, from the Ubuntu docs on swap and swappiness.
The default setting in Ubuntu is swappiness=60. Reducing the default value of swappiness will probably improve overall performance for a typical Ubuntu desktop installation. A value of swappiness=10 is recommended, but feel free to experiment.
Seems mister quoted Buntite didn't bother reading his own distro's notes on swappiness. Who have thunk it, a buntu user who's never read the docs ?!?!? Unheard of I tells ya's. Also yep, it's a friggin mess man. Been awhile since I've bothered but trying to search for valid info on swappiness setting is a painful case of the blind, leading the retarded, all of em walking around in circles anyway. LMAO, whereas a Redhat doc says on their stuff (mentions a new formula was in place) but said default 60 at that time meant 80% RAM exhaustion before swapping of APPLICATION related files kicks in. Meaning apps you're actually using, thus really screwing up their performance. Starts swapping other junk out at a much lower % surely. However again .. from first hand experience, when was briefly using LM10 OS(untweaked)would start swapping like mad, when there was still plenty of free RAM.
Found another who posted output of htop, which should be fairly hard even for a tektard to misinterpret, said showing 50% RAM still free and OS swapping like it's going out of style. Also as noted you'll see more than a tad of tutes, esp for people with plenty RAM recommending swappiness=0 and again, believe in newer kernels, that outright disables swap and my general opinion on it on a RAM rich OS would still be 10, though perhaps 20 for the appropriate setting.
Have 4gbs to work with here, always have and overwhelmingly always will leave it set to 10, only exception to that would be some really obscure corner case, in which I'd then adjust it otherwise, shrugs. Finding a flat out formula which explains it is more challenging than should be, oh well. Haven't bothered dorking with opening webpgs till swap kicks in. Imagine for me (on this 4gb dinosaur with swappiness 10), the way FF and the OS are tweaked, probably have to open 98-120 normal websites, before any swap would kick in. With OS running smooth as silk the whole while. Dammit ... I'm bound to try it now !
Update: Nope if others would like to test the waters. My connection isn't tops today, good enough to watch a movie on but forget this, stopped at 53 random websites, one of them a paused movie on YT I'm about to get back to and "free -m" says.
total used free shared buff/cache available
Mem: 3498 1457 1319 68 721 1438
Swap: 4099 0 4099Would still have to spend a bunch of time opening webpgs I don't give a crap about for this nonsense. Forgetaboutit.
Last edited by BLizgreat! (2019-11-16 18:34:57)
Offline
Testing going on right now on my 1GB laptop. Google Maps, YouTube etc usually bring it to a stop. Though seems a bit better today - maybe the latest Firefox is actually an improvement?
Bootup RAM ~210M
Maps in one Firefox tab, Youtube music (but static image for video) in another.
Swappiness at 60:
RAM 672M (total 928), Swap 133M
Play with the map a bit...
RAM 700M, Swap 213M
Machine is usable, if not exactly snappy.
Set swappiness to 10, reboot (same Fx tabs):
R 644M, S 94M
then
R 683M, S 173M
Swap slightly down, no startling difference in machine feel.
After closing Fx RAM is down to 132M (!) probably because swap still holds 85M. (Same behaviour with swappiness at 60 or 10.)
Further research will have to wait...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Those numbers don't look right to me John. Makes no sense that RAM use so close (600mbs +/- on both)and yet swap is kicking in regardless of swappiness set at 60/10. Oh well, looks like something was done incorrectly to me, swappiness 10 vs 60, are not going to take effect at the same level, at that close of a margin. Setting it to 10 the system would have to use mucho more memory before swapping would kick in than when set at 60, that's not what's happening in your stats.
The reason for post. Because I like to babble, nah more importantly thought of something related. Seen a bunch of proposed formula's for figuring out exactly how this works, some saying it's a flat %, so swappiness=60 would mean when OS has used 60% of physical RAM, it'll start swapping to disk, even with 40% still freely available. That's consistent with what I'd seen in the brief time prior to when I started adjusting this thing. Same time, others propose that it's controlled a different way, works another way.
Being gnu/linux thought crossed my mind, that it's stupid/sloppy for me to just open a bunch of browser tabs to check at what point the swappiness value I've set takes effect and makes the OS start swapping. Hmmmm, surely some nixers have already come up with a better way, google. Yep, one package in the repo's, am sure there are plenty of others. The thing is called stress-ng and let's someone put a set load on whichever systems components, including RAM. Can have it use X-amount of RAM, for X-amount of time and observe the effects.
Haven't bothered using it and of course people should read about the thing before doing so but with a utility like this, it can take all the mystery out of swappiness. A bit of testing and anyone who wants to can find out exactly how much RAM is used, at the point that swappiness/swap kick in ... Think it's cool, though have long known where I stand on this subject. Always has been, almost surely always will be swappiness = 10 for me fellow nixers. Made a VERY noticeable difference in performance, pre/post-tweak.
Last edited by BLizgreat! (2019-11-17 08:51:22)
Offline
Gotta do it, John-san just add the friggin relevant ONE line (or 2 if you add a comment to remind you what the hades the swappiness thing is/does)to sysctl.conf and reboot. Test for a bit don't see the point, remove said line or comment it out until you wan't to dork with swappiness again and you're back to 60. This is not a serious thing fellow nixer. Whichever way you went about this, obviously didn't work as shown by those stats. You're acting like this is defusing a fricken bomb or summin ... ohhhhh, do I cut the red or the green wire ? OMG, the pressure !!!
Just edit sysctl.conf and get on with your other projects. This tweak is going to improve desktop gnu/linux user experience for 99.964% of BL users (or certainly won't cause any issues, if you have 32gbs of RAM who friggin cares what swappiness is set at (I still would)and they likely aren't considering using BL either anyway.)
Mentioned in another thread, what Debian goes with default is absolutely irrelevant, that is not any sort of recommendation by them as to desktop gnu/Linux, it's a hang-over from 1994. They expect you to reconfig whatever install(s) to be most appropriate for the use-case, desktop gnu/nix in this case. Sheesh Debian has zero clue what someone's going to set an install up to be. So I guess that by leaving swappiness=60, this is also their recommendation for someone who's using Debian to run a friggin blender or juicer on their kitchen counter too ? Arghhhh, sorry again, this came off a wee bit harshly but don't make this complicated or painful for yourself or for me, okay ?
So no worries, whatever you do ........ as long as you don't touch the green wire, then you're totally screwed man !
Last edited by BLizgreat! (2019-11-17 12:18:11)
Offline
Gotta do it, John-san just add the friggin relevant ONE line (or 2 if you add a comment to remind you what the hades the swappiness thing is/does)to sysctl.conf and reboot. Test for a bit...
Exactly what I did on the laptop. It's still got swappiness set to 10: confirmed with 'cat /proc/sys/vm/swappiness'. You think "something was done incorrectly"? Gladly try any suggestions you have to test that hypothesis (as long as they don't take a week to do).
My only guess is that maybe when RAM is as low as 1GB swappiness starts not to make any difference again. The data is just going to have to be swapped out, whatever, because there's just not enough space.
Or, maybe the kernel doesn't pay so much attention to swappiness these days?
---
This desktop has 8GB and even with swappiness at 60 there's usually zero in the swap partition anyway, so lowering to 10 won't change anything. It did get choked up a week ago with a couple of Facebook ( ) tabs and a VM going, but that kind of situation is pretty rare. I tried 10 temporarily a few days ago but of course it made no difference. I could easily edit sysctl.conf and leave it at 10 permanently, but it would be very hard to judge whether it was doing anything or not.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Just curious which browser you're using, Chrome/ium ? Also no it should make more difference on a 1gb system and also no, sysctl hasn't changed at all. It's forever been for the exact purpose of allowing users to adjust kernel parameters. Listed one tool to take all the questions out of swappiness. I don't want to bother using a stress testing util to hit up my RAM just to see how much is used before swap/piness kicks in.
Doesn't matter to me, I've long known swappiness=10 is correct for desktop gnu/Linux. Anyway .. up to you or whoever. Not my OS's, none of my concern, am wayyyyy over my typing limit for a topic like this.
Gotta do it ...
This is one thing about many nixers, which at this point I find perplexing. They say things like I think, I believe, I assume or get the impression that this is like that. It's gnu/Linux, there are endless amounts of documentation, are utils and commands someone can use to watch how everything works down to the most intimate levels, can watch and monitor exactly how much memory is used, by what, can monitor in live time disk i/o etc etc. So it shouldn't ever be a guess or an I think, someone can easily learn enough to say I KNOW.
Of course provided they make the effort to learn.
Though when comes to swapping/swappiness. When a persons OS starts getting sluggish, bogging down and becomes noticeably less responsive, they pop open a terminal (which takes longer to open than it should) and types "free -m" into the thing, then looks at the OS swapping to disk. They should be able to infer that hey, this swapping thing that's going on, even though I have ample amounts of RAM still free isn't a good thing.
Last edited by BLizgreat! (2019-11-18 17:25:44)
Offline
Oops, jumped so quickly to post a pro-swappiness=10 post, though yeah doing so because it's a very relevant thing for quite a few of the users who'd be attracted to Bunsenlabs. Easy to implement, just as easily reversed and is practically guaranteed to give a performance boost in terms of making their OS's more responsive. Yeppers getting up to 8gbs, should definitely be far less concern depending upon how someone uses the system. Though imo ... yep still relevant, your system likely wouldn't have locked up had you lowered swappiness, would still say 10 but if you want to be uber conservative at least to 20.
Some of the ridiculous stats I've seen people post related to what their web browsers are using is friggin incredible to me, so yes, if people are actually seeing that much memory being gobbled when using them even with 4-6gbs or more, adjusting swappiness in my view is worthwhile. Other stuff like you mention, running VM's = virtual machines etc etc.
Asked about Chrome/ium because have seen people say it'll explicitly request or use swap somehow, while was looking over info on the subject (swappiness). Which is weird to me and haven't bothered looking into it further, I don't use Chrome or ium either. So don't know whether it was just yet another case of an anonymous nixer talking/typing out his rear-end or if there's actually something to it. In ways makes sense to me, Google Inc yeppers, wouldn't at all be surprised if the thing is designed to suck up every system resource it can get it's hands on. Make it faster or etc, thus more appealing to users. Even if it's eating system resources alive. Chrome says, ohhhhh, I see you have some free memory, thanks I'll take that. Hmmm, some swap space, mmmm, I'll take that too.
PS, Tempted to install Chromium (or Chrome)and see. It's been a long time but also not really so much curious about it and don't have a need of a bunch of browsers for cross-browser testing or whatever. Ahhhhh crap, probably will now. Want to side by side the thing vs FF. See what it's webpg load times and system overhead are like.
Last edited by BLizgreat! (2019-11-19 04:28:00)
Offline
^A good read, thanks!
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^ You're welcome.
IMHO a definitive guide on the subject. Leave sappiness alone.
8bit
^ lmao
Offline
Here's an official quote for @ohnonot..
"Don't touch my swap!"
---
(thought it sounded swappy for the fortune archive)
Last edited by cog (2019-12-13 02:47:27)
Offline
Seems you can no longer set swappiness in sysctl.conf anyway.
system.slice swappiness is inconsistent with vm.swappiness sysctl
https://github.com/systemd/systemd/issues/9276
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^ I had a cursory glance and quickly my brain glazed over like a donut. Cgroups v1 and v2? This is advanced sysadmin talk. Is it relevant to desktop users at all?
One should run some tests to see if swappiness is not properly set with the tried and proved method.
The issue was closed without much fanfare/pushback, so I guess it doesn't affect the majority of users, and the minority it does affect is well able to apply the workaround?
Offline
This is advanced sysadmin talk. Is it relevant to desktop users at all?
Well:
a) The Tried and Tested methods may well no longer work.
b) There is/was a workaround, in the page I linked, and which you found.
c) The issue was closed with [can't-fix] which doesn't inspire optimism.
My takeaway - just forget the whole thing.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline