Swap Memory (Virtual Ram) Problem!

is this Good to try ?

Another way to limit this is to use Linux's control groups. This is especially useful if you want to limit a process's (or group of processes') allocation of physical memory distinctly from virtual memory. For example:

cgcreate -g memory:myGroup
echo 500M > /sys/fs/cgroup/memory/myGroup/memory.limit_in_bytes
echo 5G > /sys/fs/cgroup/memory/myGroup/memory.memsw.limit_in_bytes

will create a control group named myGroup, cap the set of processes run under myGroup up to 500 MB of physical memory with memory.limit_in_bytes and up to 5000 MB of physical and swap memory together with memory.memsw.limit_in_bytes. More info about these options can be found here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide/sec-memory

To run a process under the control group:

cgexec -g memory:myGroup pdftoppm

Note that on a modern Ubuntu distribution this example requires installing the cgroup-bin package and editing /etc/default/grub to change GRUB_CMDLINE_LINUX_DEFAULT to:

GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1"

and then running sudo update-grub and rebooting to boot with the new kernel boot parameters.

Looks good in my eye, but you might wait for a second opinion for safty, as I have no intention to test on my machine. I still think it's a bad idea to mess the OS memory allocations system, but that's just my opinion. :slight_smile:

1 Like

thank You very much, @Storm

Btw I found this on the web

swap - How do I configure swappiness? - Ask Ubuntu
A swappiness setting of zero means that the disk will be avoided unless absolutely necessary (you run out of memory), while a swappiness setting of 100 means that programs will be swapped to disk almost instantly. -In topic

That's good found. I suggest you try that first, as it's easier to reverse if it goes wrong.

1 Like

So my current swappiness is 60 and it's using 500Mb while rider is active,
I should make to 100 directly or something else

100 is to extreme try 80 first.

1 Like

in terminal it shows 80
image
and
when i open it in text it shows 15
image
:thinking: :thinking: :thinking:

sudo nano /proc/sys/vm/swappiness

remember to reboot.

Does it work as expected?

No now using 77%Ram and 268mb swap
Also software runs with too much lag

Sad to hear that. Seems JB's rider is a resource hog, or memory leak perhaps?

Now What To DO????

I'm not sure, buy more RAM :sweat_smile:
Perhaps another member would like to share their input on this matter.

1 Like

4GB of RAM is really not enough anymore for any serious work. As you've witnessed first hand, some APPS just use more RAM then you would expect. Take GIMP for example, if I only had 4GB of RAM, I can kiss editing 5K RAW photo's goodbye. And I wouldn't be able to even edit 1080P video let alone 1400P or 4K.

So, I have to agree with Storm, its time to upgrade your RAM. Without knowing more about your computer, I have no way of knowing weather your computer uses desktop RAM, or notebook RAM, it depends on what kind of machine you have.

If you post the model of your computer, I may be able to help you find more RAM for your machine.


1 Like

Hp ProBook 450G

According to Memory Stock, your HP 450 Probook has two RAM slots, and it can accept a maximum of 16GB of RAM.
ProBook 450 G4 Memory Upgrade - HP 450 G4 ProBook Laptop Memory.

This is excellent for you, because it means the RAM isn't soldered to the mobo. Since your notebook comes with 2-slots, it means you can run RAM in dual channel, to achieve the highest level of performance.

That is a listing for a 2x8GB kit. Amazon has an excellent return policy, if it doesn't work, you can return it. But these RAM chips are getting more rare as time goes on. I was trying to search for other brands that are more well known like Corsair, but they only had a single 16GB stick with a heat spreader that might be too big to fit a thin and lite notebook.

You don't want to run in single channel mode, as its slower. And like I said, a heat spreader is nice for dissipating heat and all. But they typically won't fit in thin and lites. So, I chose RAM sticks without heat spreaders. Hopefully this helps...

Video to show you how to RAM upgrade your notebook model!


1 Like

Great service you provided, @StarTreker :slight_smile:

1 Like

Thank you Storm!

Truth is, hardware is more my specialty then software. And I find hardware solutions to be easier then software related issues. Its no secret that I struggle greatly with software related issues.

But hardware I can solve, and I always like helping other's with hardware related stuff. If I can help someone out there with that, it brings me satisfaction that I did something good. I just hope that it helps the OP. :slightly_smiling_face:


2 Likes

@StarTreker
Got a solution for my HP pavilion touchsmart by any chance? this Lappie seems glued, can hardly be opened, also has only 4 gigs, is 9 years old. Runs Zorin 16 lite and Mint at the moment

There have been many different models of that device. Can you give me your model number?