How to use all the RAM when loading into memory?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
Grey
Posts: 2023
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 76 times
Been thanked: 376 times

How to use all the RAM when loading into memory?

Post by Grey »

So. Let's say there are 64 gigabytes of RAM available. We load Puppy into RAM without a save file (folder), "cleanly". We see such data:

ram.png
ram.png (11.26 KiB) Viewed 961 times

How to turn threes into sixes? That is, use 64, not 32 gigabytes of RAM.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
Grey
Posts: 2023
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 76 times
Been thanked: 376 times

Re: How to use all the RAM when loading into memory?

Post by Grey »

Okay, I'll clarify :) Not all 64. Let 8 work as RAM, and 56 as disk.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: How to use all the RAM when loading into memory?

Post by Phoenix »

It's one of the current mounts. Unfortunately due to puppy very slight restructuring of default mounts, it might be on a different path.
Use mount to list all current mounts and look for your tmpfs.
Then type in mount -o remount,size=X /initrd/path/to/tmp
G is for gibibytes. (?)
/tmp is not always right, for bionicpup64 /tmp is linked to a directory within the mount.

IRC: firepup | Time to hack Puppy!

User avatar
bigpup
Moderator
Posts: 6975
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 902 times
Been thanked: 1520 times

Re: How to use all the RAM when loading into memory?

Post by bigpup »

The memory controller in the Linux kernel is controlling RAM (memory) usage as demanded by whatever you are doing.

Puppy is only going to use the amount of RAM needed no more no less.

When Running Puppy with no save.
The complete Puppy operating system is loaded into RAM.
A save RAM disk is created to use for storage. (Acts as the save)
It does start out as a set size, based on amount of RAM in the computer.
By your example.
Save RAM disk is using half the 64 GB of RAM
Why?
So the rest of the RAM is free to use by programs you run.

When you run Puppy with a save file/folder.
All of Puppy still loads into RAM.
The save file system, only loads, layered into the file system, not into RAM.

Just use the computer and run Puppy on it.
There are processes constantly adjusting RAM usage based on need and what is being done.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
amethyst
Posts: 2414
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 504 times

Re: How to use all the RAM when loading into memory?

Post by amethyst »

When running without a savefile/folder, Puppy sets aside half of your total RAM to be available as storage space for data (it was like that, I assume it still is with newer Puppys). There are ways to change this allocation size. Actually in normal circumstances this should have been changed by now with new machines having so much RAM Does not really make sense to have that massive amount of RAM set aside for storage purposes.......

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: How to use all the RAM when loading into memory?

Post by Phoenix »

bigpup wrote: Mon Mar 14, 2022 6:13 am

The memory controller in the Linux kernel is controlling RAM (memory) usage as demanded by whatever you are doing.

Puppy is only going to use the amount of RAM needed no more no less.

When Running Puppy with no save.
The complete Puppy operating system is loaded into RAM.
A save RAM disk is created to use for storage. (Acts as the save)
It does start out as a set size, based on amount of RAM in the computer.
By your example.
Save RAM disk is using half the 64 GB of RAM
Why?
So the rest of the RAM is free to use by programs you run.

When you run Puppy with a save file/folder.
All of Puppy still loads into RAM.
The save file system, only loads, layered into the file system, not into RAM.

Just use the computer and run Puppy on it.
There are processes constantly adjusting RAM usage based on need and what is being done.

It's not necessarily true that the 32GB set aside to the ram disk is automatically reserved and locked to the physical RAM. It can be swapped out to disk, a very useful feature when you're trying to build GCC with 256MB of RAM. It writes to /tmp meaning that if your tmpfs happens to be too small to fit... 2GB I think for one single file it will fail. Now if you oversize it dramatically to 5G, it will write to swap. Because to the kernel it is (volatile) memory, in the virtual and not real sense. (4GB swap + 256MB is certainly not 5G)

@Grey I didn't notice your specification until now, but the answer to resize it to 8GB/GiB is mount -o remount,size=8G /path/to/the/actual/tmp

But as already mentioned /tmp may be linked for whatever reason to a directory within the real tmpfs. So you'll need to invoke df -h by itself and look for the mountpoint of the tmpfs. The size should match whatever the storage utility icon says you have.

IRC: firepup | Time to hack Puppy!

User avatar
mikewalsh
Moderator
Posts: 6149
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 788 times
Been thanked: 1976 times

Re: How to use all the RAM when loading into memory?

Post by mikewalsh »

Well, I take the simplistic view.

I don't worry about specific processes reserving specific amounts of space and locking specific items to them. Where's the point? I have better things to do with my time than dig that deep into the kernel's nuts'n'bolts.... :|

I have 32 GB RAM, and Puppy's a small distro. I also have around 65 GB of swap space total - long story, can't be bothered to explain. And around 5 TB of storage.

As far as I'm concerned, I know I'm never going to run out of space for anything I might want to do. As bigpup says, the kernel is constantly adjusting RAM allocation/swap usage dependent on what I'm doing, and how many processes I have running, etc. It's a very efficient organiser - far more so than I could hope to achieve manually - and at that it's doing no more, no less than what it's designed to do.

@Grey :- I'm going to take an educated guess here. This is to do with your long-term Blender 'plans', am I right? :)

Mike. ;)

User avatar
Grey
Posts: 2023
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 76 times
Been thanked: 376 times

Re: How to use all the RAM when loading into memory?

Post by Grey »

mikewalsh wrote: Mon Mar 14, 2022 11:31 pm

This is to do with your long-term Blender 'plans', am I right? :)

Basically I have an "academic interest" :) But using Blender for small sketches without a hard drive would also be interesting. Yesterday I started using version 3.1 and it seemed to me that the new Blender started using less memory. But this is purely subjective :) , I haven't checked yet.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

Post Reply

Return to “Users”