Today's article has you adjusting swappiness...

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,909
Reaction score
10,491
Credits
98,504
I've been a bit busy, but there is indeed an article for today. It's only a half hour late, so that's not bad. Heck, it's often several hours before I get time to post my links here.

As folks may know, I'm a swap advocate. (No, that's not kinky.) It means I like the system to have a swap file, or an additional memory management tool for the kernel. I've shared my reasons and they're logical reasons. So, I tend to use a swap file. It's easier than a swap partition, so there's that.

Anyhow, adjust swappingess:


Feedback is awesome.
 


Good article.

I use a similar method.

Code:
cat /proc/sys/vm/swappiness

Code:
sudo sysctl vm.swappiness=10

Code:
sudo sed -i '$ a\vm.swappiness = 10' /etc/sysctl.conf

Reboot computer.
 
Yeah, you can do it with sed just fine. As I'm usually aimed at newer users, I suggest using nano quite frequently. It's easy. It works. Writing out the directions is easy.

Also, I don't have to explain sed, which means I don't have to explain awk. LOL

I'm not as fluent with those as I should be, but I've got some basics down. I don't think I know enough to write meaningful articles on either, though I might be able to fake it for a basic article.
 
Reboot computer.
If the machine is running systemd then there's no need to reboot, rather run, as root:
systemctl restart systemd-sysctl.service

The instructions said.
The new setting is activated in next boot so that's what I did.

I follow the instructions that are given so when it says a system restart or system reboot is needed than that's what I do.

I'm just a Linux user not a Linux guru. ;)
 
Yeah, you can do it with sed just fine. As I'm usually aimed at newer users, I suggest using nano quite frequently. It's easy. It works. Writing out the directions is easy.

Also, I don't have to explain sed, which means I don't have to explain awk. LOL

I'm not as fluent with those as I should be, but I've got some basics down. I don't think I know enough to write meaningful articles on either, though I might be able to fake it for a basic article.
This is something I ran across back in my first days using Linux in 2014 so yeah like me old and outdated. :p
 
Another excellent article and very easy to follow.
t2011.gif


Mine is set to 10 and used another method...I have 16GB of RAM so I wont see much change but I'm using an SSD. So reducing swappiness will increase the life of the Drive...so I'm told.
m1213.gif
 
Another excellent article and very easy to follow.
t2011.gif


Mine is set to 10 and used another method...I have 16GB of RAM so I wont see much change but I'm using an SSD. So reducing swappiness will increase the life of the Drive...so I'm told.
m1213.gif
They say that it cuts down on the amount of times it writes to the HDD / SSD.

The lower number level of swappiness the less it writes to the drive so less wear and tear.
 
If the machine is running systemd then there's no need to reboot, rather run, as root:

Do feel free, encouraged even, to drop that as a comment on the article. I haven't tested it, but it looks right to me.
 
I have around 62 GB of swap partitions, spread around the system.....including one chunk of 48GB. Sounds crazy, don't it?

There IS method in the madness. I have 32 GB DDR4, and I suspend Puppy regularly. Unfortunately, the way HP have set-up the BIOS on this Pavilion desktop, when suspending it insists on mirroring the entire contents of RAM to a single, contiguous location.....regardless of how much is actually in use!

It doesn't like splitting it up into smaller chunks in different locations. (I tried that, and it point-blank refused to behave itself, so.....this is the 'solution' I had to settle for.)

Mike. :rolleyes:
 
I have 32 GB DDR4,

Mike. :rolleyes:
Wow I'm still running Linux mostly on old Frankenstein desktops with dual core processors and 4.0 GB and 6.0 GB of memory.

I do have a couple of newer desktops with quad core processors and 8.0 GB of memory so I'm slowly getting up to date. :p
 
@Bartman :-

Well, having HAD to replace the dead rig right at the beginning of Covid, and with being stuck at home - and money that would normally have been spent on outings, etc, building up in the bank - I did quite a bit of 'splurging' that first year. I wanted to address some of the issues that had seriously limited me with the Compaq.......like a max of 4 GB ('cos DDR1), and being IDE/PATA-only (which wasn't helping, either).

I never wanted to be limited by RAM availability again, for a start. It increased step-wise, as the months passed; 4GB became 8 GB. Then I bought a 16GB Crucial kit mid-summer. I would have been happy enough to leave it there, except that in November I found an unbelievable deal on Amazon; a 32 GB Crucial kit of the same type DDR4 RAM.......for less than I'd paid Crucial themselves for half the quantity earlier in the summer!

Needless to say, I grabbed it.

-----------------------------

I also wanted a discrete GPU. I'd never been able to run one in the Compaq, because the single PCI-ex16 slot was damaged. I bought a 2 GB Asus GeForce GT710; low-power - the HP has a weird, 180W slimline PSU that's almost impossible to replace - it only draws 19W through the slot itself. Luckily, I got that in Spring 2020, before crypto sent GPU prices into the realms of "stupid". So that took care of that.

-----------------------------

And I wanted to replace the Toshiba primary spinner with an SSD, so a 1TB Crucial MX500 went in, too. Along with other drives, that gave me almost 6 TB in total.

I'm not a power-user, but video-editing has become a thing with me, so a discrete GPU and plenty of RAM & storage is required. Openshot and/or Lightworks are my tools of choice, and the whole rig is very well suited to this now, with the Pentium G5400 having plenty of legs and all the modern instruction sets I could need.

I'm quite happy with the results.......and Puppy, despite what folks would have you believe, is more than capable of handling my new "hobby". I'm satisfied with it!

Mike. ;)
 
I'm amazed at what's available PC wise nowadays however shocked at the high cost of PC components.

Yeah me too...I don't think it's ever been cheap but it does pay to buy brand name parts.
happy0034.gif
 

Members online


Latest posts

Top