Using RAM, less or more?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Using RAM, less or more?

Post by trawglodyte »

I've been learning about RAM and trying to understand it better. Despite using computers for decades it's not something I knew much about. Back in the day I upgraded a laptop from 4G to 8G and it was instantly and noticeably faster and a more enjoyable experience overall. So I just had a general idea that it was good to upgrade whenever you could, but I think that's changed somewhat. I recently upgraded from 16G DDR4-2400 to 32G DDR4-2666. Well, my computer is 7 yrs old and I kind of decided I'm going to try to stick with it for another 7 yrs so I shelled out for some upgrades. I'd have to say that the RAM upgrade makes almost zero difference to my normal computer use though. I'm not saying I regret it, just that it's totally different than when I doubled the RAM from 4G to 8G on that laptop way back when.

I've noticed in online forums (not necessarily this one, just in general) it seems there are many people who feel using RAM is bad. I think this comes from them reading other content specific to people with very limited amounts of RAM who legitimately need to keep their RAM use down.

I'm not sure if I'm thinking about this correctly, but shouldn't we want to use as much of our RAM as we safely can? For example, the M.2 2280 nvme's have really dropped in price and it's amazing how fast they are. Gen3's are over 3,000 mb/s and Gen4's are 7,200 mb/s. But your RAM is still about 10X faster. I monitor RAM use with Conky, and I'm never anywhere close to using even 1/2 of it. It seems like I should try to get more of the common programs I regularly use into it. Or even some I don't use that often, such as Krita, which loads very slowly for some reason. If I have plenty of RAM, and making sure Krita is loaded into it might make it launch faster, that's good right?

(side note- I'm also going to give GIMP another shot. IDK if there's much difference between GIMP and Krita. Krita is heavy but it does do the things I need it to do very well)

I also want to ask, where do you draw the line? If I understand correctly very bad things can happen if you ever max out your RAM. Occasionally I do some things which do use more RAM, I don't think I've ever been anywhere close to maxxing it but wonder how much do you want to have free during normal use so when you do something more intensive it also has what it needs? I would say that 90% of the time I am only using 20% of my RAM or less. One year ago, I wasn't even monitoring RAM use but I probably would have thought that was GREAT!! Looky! I'm barely using my RAM!! lol. I've almost done 180 flip. Now I think about what programs I use regularly and would they be quicker launching and more responsive if they were loaded into RAM.

I feel somewhat validated in this idea because my buddy got a new Macbook PRO, and one of their selling points is the OS intelligently determines what you use most often and keeps them preloaded, if I understand correctly. I don't think Mac is the only one doing this either.

One last thought - I think this is relative to Puppy Linux because at first I thought I definitely didn't want to boot from a USB. I wanted to install it on my hard drive like most of the other OS's I played with. I also thought I definitely didn't want it to load into RAM on startup. Well, I'm glad I learned how to install Puppy to hard drive and I like it set up that way. But I now realize booting from a USB is also a great way to run Puppy Linux with a few advantages that putting it on hard drive doesn't have. I've also changed my mind completely about loading into RAM on startup and now love that Puppy Linux does that by default, and I leave it that way on my machine.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

backi
Posts: 589
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 71 times
Been thanked: 65 times

Re: Using RAM, less or more?

Post by backi »

I am mostly using Fossa or Bookworm Dogs.
I am loading the whole Os from a SSD into Ram (8 Gigs) with the few Programs permanently installed which i mostly use (Browser-Smplayer-Vlc Media Player).
Ultra fast.----loading everything into Ram during Session prevents unnecessary write-backs to SSD.
Same can be done from Usb-Stick......but loading last a bit longer.
While loaded everything is running fast as Hell......no write-backs to Usb-Stick.....during Session.

Loading everything into Ram is accomplished in Fossa or Bookworm Dogs with adding to Kernel Line "copy2ram"
Loading everything into Ram is accomplished in Fossa-Pup with adding to Kernel Line "pfix=copy "

Programs i do not often use ....i just load them on the fly (for Example Gimp.sfs.....or Gimp.squashfs or Open-Office) and unload them if no longer in use.
Never experienced running out of Ram.

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Using RAM, less or more?

Post by trawglodyte »

backi wrote: Mon Jan 15, 2024 2:45 pm

with the few Programs permanently installed which i mostly use (Browser-Smplayer-Vlc Media Player).
Ultra fast.
Programs i do not often use ....i just load them on the fly (for Example Gimp.sfs.....or Gimp.squashfs or Open-Office)

This is what I need to understand. I usually learn by screwing things up every possible way, and starting over 10X but maybe this time I can get an idea of what I'm doing first.

Example - I'm in BookwormPup64_10.0.3 right now. It came with Firefox, so that loads into RAM on startup, along with the .sfs files (adrvxxxxx.sfs, bdrvxxxx.sfs, zdrvxxxx.sfs, etc....) in the same directory with the vmlinuz and initrd.gz, correct? What I mean to say is that all the apps, including the out-of-the-box Firefox this OS came with has to be in one of those .sfs files, because those .sfs files are all that loads the first time I fire up BookwormPup or any other Puppy Linux. But Firefox has been upgraded since I installed this, like first thing, and that would have to partly be in my "pupsave".sfs which is not in the same directory, right? Does your "pupsave".sfs also fully load into RAM on startup?

If I get a GIMP.sfs, for example, and want it to load on startup, can I just place it in the same directory (the base of the BookwormPup64_10.0.3 folder on my Puppy partition) with vmlinuz and initrd.gz? Or is it more difficult than that?

I'm a bit confused at the moment, because I think if I put a GIMP.sfs in the my-applications folder it is going to become part of my pupsave.sfs when I save (PupMode13). So the fact it doesn't load on startup leads me to think my pupsave.sfs must not fully load on startup (and probably shouldn't). Am I getting close? It still doesn't quite add up to me.

These other .sfs's that you prefer to load-on-the-fly, do you just save them anywhere else than that base directory? What is good practice for that? The default my-applications folder?

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

User avatar
wizard
Posts: 1617
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2138 times
Been thanked: 505 times

Re: Using RAM, less or more?

Post by wizard »

@trawglodyte
Here is how I have always explained computer function to new users.

Computer analogy to physical office:
CPU = you, what does the work
RAM = desktop where the work is done
HDD, SSD, etc = storage, the file cabinets where the task/documents are stored

With a physical office, task/documents are taken from the file cabinet(HDD, SSD, etc) and placed on the desktop (RAM), where you (CPU) do the work.

You can put multiple task/documents on the desktop until it is covered (RAM is used up) at which point something has to be removed or temporarily returned to storage (swap file).

So, the ideal amount of RAM is that amount that does what the user wants without using swap. It varies for each user.

one of their selling points is the OS intelligently determines what you use most often and keeps them preloaded, if I understand correctly. I don't think Mac is the only one doing this either.

MS Windows "Fast Startup/hibernate" is the same kind of thing. Many MS Windows programs have always done something similar by loading a "stub" or partial load during boot. They do this to shorten the startup time for their application. They found that to slow a startup was a kind of "kiss of death" in the market.

These "cheats" are all well and good if you have enough ram and storage and you only suspend or hibernate when the computer is not in use. The big downside is a much slower cold boot time. This has been offset somewhat by the use of SSD's for storage.

Given the current state of the art, you might want do at least one cold boot every day just to "clear the deck" and get rid of the trash.

wizard

Big pile of OLD computers

backi
Posts: 589
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 71 times
Been thanked: 65 times

Re: Using RAM, less or more?

Post by backi »

Loading the whole Shebang in Puppy Linux into Ram needs------ Menu>Puppy Event-Manager>Save-Sessions -set to Pupmode 13.
Means set >Save Interval=0 (never)

Tick "Ask at Shutdown whether to save or not "......save it.

In this Mode (Pupmode 13) a Save Icon will appear on Desktop after reboot......can be used for saving during Session on Demand to Save to Save File/Folder.
If Session is not saved...... every Modification during Session ( because Session is running in Ram) is lost ....nothing will be saved to Save File/Folder.

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Using RAM, less or more?

Post by trawglodyte »

@wizard

That is a brilliant analogy! I'm more of a toolshop guy than an office guy, but I've always been sus of people who's desks are always perfectly tidy or toolbench is always clear. It makes me think they aren't doing much. Find someone with a desk almost covered with stacks of papers most of the time or 1/2 their tools out and that's somebody getting stuff done.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Using RAM, less or more?

Post by trawglodyte »

@backi

I do use pupmode=13 as you described based on a recommendation from this forum, and I like doing it that way. But is "the whole she-bang" loaded? If the whole she-bang is loaded, why is there a load-on-the-fly for .sfs files? Aren't they kept in your "pupsave".sfs? Does it load the "pupsave".sfs but not the .sfs files stored in it?

Either I'm close to understanding this, or it's way more complicated than I think and there's no way to dumb it down enough for me to fully get it.

I do think the .sfs files stored in the base directory with vmlinuz and initrd.gz are fully loaded into RAM and never change, but are overwritten with changes in your "pupsave".sfs, am I right about this? Like, if I used this for 5 years and deleted any "pupsave".sfs files I had it would then boot and load exactly as it was the first time I booted it. Yes?

I would also note, that while I'm enjoying pupmode13, it seems as if there are instances where something or other is reading what is in the stored file, and not the changes I've made which are still in RAM. Am I imagining this, or is this part of the pupmode13 experience?

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

backi
Posts: 589
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 71 times
Been thanked: 65 times

Re: Using RAM, less or more?

Post by backi »

Like, if I used this for 5 years and deleted any "pupsave".sfs files I had it would then boot and load exactly as it was the first time I booted it. Yes?

Yes ....it will be pristine, just the Original without any Modifications .......so it`s always good to have a Backup/Copy of your Save Files/Folders........just in Case.

I am in the moment not much using Puppy Linux ....more "The "Dogs"...so i am not much familiar with it`s Construction and the appropriate Terminology which is used.

But you can load xxx.sfs Files on the Fly by right Mouse-click on it and choose "sfs_load" in the Menu.
If you put them into Base Folder they will be loaded automatically at Startup.......as far as i know.
They are gone after Shutdown ------even if Session is saved ......will not be saved into Save File/Folder.
Just experiment with it.....there is not much which can go wrong.

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

Re: Using RAM, less or more?

Post by mikewalsh »

@trawglodyte :-

With regard to "How much RAM is TOO much?", umm.....

When I first started with Puppy 10 years ago, I was using an elderly Compaq Presario desktop, built just before the HP buyout that relegated Compaq to just a model name in HP's line-up. A sad end for an innovative company that were often years ahead of their time. However.....I digress.

The thing was 10 years old at that point in time. It was very early 64-bit - Athlon64 X2 dual-core - and ONLY DDR1. So, pretty slow (400 MHz, not the 2666 MHz I now have). And it was limited to just 4 GB, max.

It lasted another 6 years, even so. It finally died just before the pandemic got into full swing, in early 2020. The capacitors eventually dried out. It hadn't done too badly!

========================

When I bought this HP Pavilion desktop a couple of weeks later, it came with 4 GB. Well, after years of having to use apps as lightweight as possible in order not to bog things down too much, I was getting very fed-up with this. I decided, right from the outset, that this new machine was NOT going to be stuck in that same old rut.......if at all possible, it was going to get as much future-proofing as I could stretch to.

  • Within a fortnight, 4 GB had become 8 GB.
  • Four months later, I decided to buy a 16 GB kit direct from Crucial themselves. This made a massive difference, especially with regard to multi-tasking.
  • In November of that year, I found an unbelievable deal on a 32 GB Crucial RAM kit, correct frequency/timings'n'stuff for my machine.......for less than 50% of what Crucial had charged me for half that amount back in the summer! Needless to say, I grabbed it while it was available. This mobo maxes out at 32 GB, so.....why not?

With all the lockdowns going on, I had a steady build-up of cash in the bank that wouldn't normally be there; in the regular course of things, it would have been frittered away on outings, treats, little luxuries, etc, etc. I thought I might as well put some of it to good use.

Storage got upgraded to SSDs. I bought my first-ever discrete GPU, along with a few other bits'n'bobs I'd had my eye on for a while......including a second Logitech c920 webcam.

==============================

As to how much is actually TOO much? That, I think, is entirely down to the individual.

Remember; just a couple of years ago, 32 GB was considered THE amount for enthusiasts to aim at. With the advent of another new generation - DDR5 - and capacities doubled (again!!), that's now 64 GB. Some enthusiasts are already kitting themselves out with 128 GB...

Apple, with the 3rd-gen M3-equipped top-end MacBook Pros, are supplying them - upon request, and receipt of a ridiculous amount of cash! - with 192 GB DDR5...

So much of what I've just mentioned is very rarely NEEDED. It boils down to one thing, TBH; geek's "bragging rights".

=============================

Usual advice is that 4 GB is barely sufficient for anything. General home use requires at least 8 GB; if you can stretch to it, 16 GB will provide a good all-round experience. Once you've reached the point where you've got RAM and to spare for your normal usage, further additional RAM upgrades WILL be unnoticeable.

As for SFSs, think about it this way; you, like I, have plenty of RAM, and in general, a decent system with plenty of 'grunt'. But other members are still trying to run elderly kit that is seriously resource-starved.....and the whole concept of SFS packages in Puppies dates back many years to the early days, when current tech was just a dream.

SFS packages may "reside" in the 'save' while loaded, but they usually live outside the save. You and I could leave them permanently loaded and not notice them, but others like to "load while using", then "unload when finished".....especially with low resources to play with.

Technology has moved on, but as always, not everybody is either bothered about keeping up with it, or else are NOT in a financial position to keep up with it. So some run up-to-date tech, and others run very old stuff.....and the majority will run stuff anywhere between these extremes.

Puppy attempts to cater for everyone. Regardless of your hardware, or personal situation, there's a Puppy for you somewhere amongst the collection.....with different methods for doing things, so as to suit as many different machines as possible. :D

==========================

Is it possible to use up every bit of these ridiculously huge amounts of RAM? Perhaps not in the course of normal operation (unless you're a very "heavy" user), but it CAN be done. I did, last night.......totally by accident.

I'd been experimenting with command-line methods for 'looping' videos with mPlayer and ffmpeg. mPlayer was easy, but since I'm a masochist I decided to experiment with ffmpeg!

The advice in the terminal did warn that if you didn't get the syntax absolutely correct, it would spawn a "ghost" process, totally separate from the shell, that would continue to run in the background.....increasing in size all the time until it had consumed all your RAM. I'd finished with it, so I killed the terminal; kill the terminal, kill the process, right? Wrong.......

Around 35 minutes later, I began to notice things getting jerky, and not responding as they normally do. Less than 2 minutes later, everything ground to a halt.......frozen SOLID. A quick glance across at pWidgets showed the RAM 'gauge' was FULL, which I'd never seen before. I had to perform a hard power-off, since there wasn't even enough RAM left for Puppy to run the shutdown routine and exit gracefully..!

So.....yes. It CAN be done..! :D

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Using RAM, less or more?

Post by trawglodyte »

mikewalsh wrote: Mon Jan 15, 2024 8:14 pm

Remember; just a couple of years ago, 32 GB was considered THE amount for enthusiasts to aim at. With the advent of another new generation - DDR5 - and capacities doubled (again!!), that's now 64 GB. Some enthusiasts are already kitting themselves out with 128 GB...

I think someone considering a new machine should think about DDR5, more the speed than 64/128/192 G capacity. Like you, I have DDR4 2666 which is 21,600 mb/s. I'm embarassed to say I owned this computer for years before realizing I could go into BIOS and click xmp profile and a few other things and make it perform much better. But anyway DDR5 5200 is twice as fast as my DDR4 2666. Do you need it? nah, the only thing coming I know of that might drive demand and make older machines somewhat obselete is 4K video, monitors, high-def webp moving images for wallpaper. I feel as if many people will want that when they see it, and the industry sort of needs it because if something like that doesn't happen we can just keep our computers or find a smoking deal on eBay on a little-used older machine.

It's crazy thouugh, I got in on the early days of YouTube when we had 320x240 vids and the codecs couldn't even do that well. I thought 1280x720 with h264 was great and when I saw 1920x1080 I thought there could never be anything better. Well, there's diminishing returns, it's getting so ridiculous the human eye can't appreciate it. If a process runs in 20 milliseconds vs 50 milliseconds do we notice?

nvme hard drives are moving into the same mb/s range as DDR3 RAM now. I don't think it's a complete apples to apples comparison but it's insanely fast.

I tinker with ffmpeg too, but mostly to compress video,change image sizes, and process audio. I don't know the first thing about looping, I just keep seeing that word pop up in some of the ALSA/pipewire stuff I've been looking at. I guess I'll eventually have to learn what it is.

Last edited by trawglodyte on Mon Jan 15, 2024 9:39 pm, edited 1 time in total.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

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

Re: Using RAM, less or more?

Post by bigpup »

I do think the .sfs files stored in the base directory with vmlinuz and initrd.gz are fully loaded into RAM and never change, but are overwritten with changes in your "pupsave".sfs, am I right about this? Like, if I used this for 5 years and deleted any "pupsave".sfs files I had it would then boot and load exactly as it was the first time I booted it. Yes?

Correct.

The save file/folder never loads into RAM, but the file system in it, is layered into the operating file system.
To the operating file system, the contents of the save are part of it.

I would also note, that while I'm enjoying pupmode13, it seems as if there are instances where something or other is reading what is in the stored file, and not the changes I've made which are still in RAM. Am I imagining this, or is this part of the pupmode13 experience?

That is normal when booting using a save. Pupmode 12 or 13.
Anything that is stored in the actual save, when started, is going to be read from it, and added to operating RAM.

Yes, if you update a program that is already in one of the xdrv.sfs's.
All the updated parts are stored in the save.
So run the program, and part of the program, now has to be read from the save, and loaded into RAM.

Pupmode 13 operation uses two places to work as the save.
At first changes go into a save ramdisk that is a set aside section of RAM, working like the normal save.
when told to do it, what is in this save ramdisk is moved to permanent storage in the normal save.
The main idea was to limit writing to the drive the save is on.
But it also keeps stuff from going into the permanent save, until you are sure you want to keep it.

SFS packages loading and unloading.
Best place to store them is in /mnt/home location of the drive Puppy frugal install is on.
This location is outside of the save file/folder.
When loaded a SFS package contents is layered into the operating file system, so it acts as if it is installed.
Unload it and to the operating file system it is not there.

If you look inside a specific program SFS package.
It will have a Linux file system, with only the specific locations the parts of the program would be located in, if it was installed into the operating file system,
All the parts of the program are there, where they would normally be installed.
when SFS is loaded, the two Linux file systems are layered together, to operate as one file system.

Forum Global Moderator
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
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Using RAM, less or more?

Post by trawglodyte »

@bigpup
Thank you, that is very helpful! If I can ask two more questions.

  1. If I put a .sfs file in the same location as vmlinuz, initrd.gz, and the main OS .sfs's will it also load to RAM on boot-up? Or is that a bad idea?

  2. Let me rephrase my question about pupmode13. Let's say I'm in pupmode13 and I've saved some files, or made some changes in config's for ALSA/pipewire or something. Maybe configs are a bad example, even in full-install mainline distros I would probably reboot if in doubt to make sure it was recognized. A better example might be installing NVIDIA, or perhaps a .pet app that needs to access files or something. I guess I'm paranoid or just really want to know how it works but I always am thinking I need to hit the pupsave to make sure my programs are seeing my changes in RAM and not looking at what's still in the "pupsave".sfs on my hard drive that doesn't include the changes yet.

Does that actually happen or does everything cooperate with what's in RAM, including whatever I've changed since my last pupsave?

Many of those types of thing are only inherent to installation and getting all my apps and system settings how I want. If I was settled into a Puppy Linux and just using my apps for day to day stuff I would probably not worry much about pupsave until I shutdown or reboot.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

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

Re: Using RAM, less or more?

Post by bigpup »

  1. No
    The specific named xdrv.sfs's are the only ones that get loaded into RAM.
    The boot process is only going to load those specific named SFS's.

Now, if you added a xdrv.sfs that was not already there.
Say a ydrv.sfs, if the boot process was setup to look for a ydrv.sfs, it would load it's contents into RAM.

Program SFS packages are controlled by a SFS loading/unloading program.
If you set one to load and keep it set that way.
A information file is written, that can be read by the boot process.
When you next boot up, this file is read, and it tells the boot process to also load this program SFS package contents layered into the operating file system.
Only the SFS packages file system is layered into the operating file system. To run the specific program, data still has to be read from the SFS package into RAM.
Yes, you could have multiple different program SFS packages selected to always load into the operating file system.

Forum Global Moderator
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
bigpup
Moderator
Posts: 6297
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 739 times
Been thanked: 1296 times

Re: Using RAM, less or more?

Post by bigpup »

Pupmode 13

does everything cooperate with what's in RAM, including whatever I've changed since my last pupsave?

Yes.
The save ramdisk is doing the same job the actual save file/folder does. But it is not in a permanent storage. No power and what is in save ramdisk is gone.

first changes go into the save ramdisk and what is in it, is seen as a layer, added to the operating file system. You can think of it layered into the file system in the actual save file/folder.
But to make stuff in the save ramdisk permanent. You tell it to empty out and put everything in it, into the actual save file/folder. An actual write process is performed.

I guess the best way to look at it.
Save ramdisk and actual save file/folder, to the operating file system, everything in them is seen as usable installed data.

Forum Global Moderator
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
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Using RAM, less or more?

Post by trawglodyte »

@bigpup Thank you, that's exactly what I wanted to know. In a nutshell, after boot-up my pupsave.sfs file is sitting on my hard drive all by itself with nobody to play with until I do another pupsave or choose to access it myself. Everyone is playing with the copy of it in RAM that I update as I go along. If I reboot without saving that version disappears and when I boot again I get the same version I had at the beginning of my last session.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

User avatar
mikeslr
Posts: 2799
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 173 times
Been thanked: 841 times

Re: Using RAM, less or more?

Post by mikeslr »

Just a couple of things to note. When running under PupMode 13, nothing is written to a SaveFile/Folder until you manually execute a Save such as by using the Save Icon on the desktop or Save at shutdown. But Puppy will recognize and use a pet you installed but have not yet Saved. Menu>Exit>Restart-x (AKA Graphical Server) will cause Puppy to 're-catalog' what makes up the 'operating system in RAM', including the 'installed' but not yet Saved application. This is handy. You can test the application, find out if any libraries are missing, install them, test again and only Save when you satisfied. If you can't get the application to work; or if it conflicts with something else, you can reboot without Saving.
If you find you have conflicting applications you can convert them to SFSes and only load whichever you need.
Initrd(?z) has instructions as to what file-systems to copy into RAM on boot-up. I refer to those as 'alphabet.SFSes: e.g. fdrv.sfs, zdrv.sfs, adrv.sfs, ydrv.sfs and in some recent Puppys bdrv.sfs. Puppys can employ more than those; but that requires initrd(?z) be edited. mistfire has done that with Quickpup. And amethyst with remastered Racy and precise.
Except for bdrv.sfs --which Puppys using apt/synaptic-- need, I have yet to think of a good reason to employ more than fdrv.sfs, zdrv.sfs, adrv.sfs, ydrv.sfs. fdrv.sfs holds firmware; zdrv.sfs holds drivers (if you want you can combine them), while adrv.sfs and ydrv.sfs hold additional applications with adrv.sfs having priority. It's like layering: you only use what's on top. Files in the 'core' sfs --e.g., puppy_dpup_10.0.3.sfs-- have lower priority than ydrv_dpup_10.0.3.sfs, which has lower priority than adrv_dpup_10.0.3.sfs which has lower priority that the content of dpup_save(.sfs) which has lower priority than what's been installed into RAM after you Restart-X.

Except for 'alphabet.SFSes', SFSes are not copied into RAM; only mounted and indexed. To always have an 'ordinary.SFS' mounted on boot-up, you have to use a Save: but AppImages and portables can be located in /opt and captured in either a ydrv.sfs or adrv.sfs using the Save2SFS module of nicOS-Utilities-Suite, https://www.forum.puppylinux.com/viewto ... 983#p12983.

That module makes it much easier to 'capture' applications and their settings in an adrv or ydrv, or modify those files-systems than to remaster. My practice is to only remaster to 'remove builtins' I know I'll never want; or to include applications --such as masterpdfeditor4-- which I'll always want, won't update, and are not available to a newer Puppy such as Bookworm. Other applications --but not web-browsers--I capture in a ydrv.sfs. Web-browsers are frequently updated. So I prefer portable web-browsers: duplicate the old's folder before updating so I can easily revert if there's a problem.

But I'll locate one Web-browser --usually the most current version of fire-fox; hardened for Security and privacy-- in an adrv.sfs. When I want to I can boot 'pfix=ram'. When booting is finished, all drives --including that where Puppy is located-- are dismounted. And if Puppy was booted from a USB-Key, the Key can be unplugged. All the applications I use during that session are in RAM. Caution: you need a considerable amount of RAM: 4GBs is barely adequate.

User avatar
gychang
Posts: 553
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: Using RAM, less or more?

Post by gychang »

I am running F96-CE4, frugal install to internal NVME drive. Got 16G of RAM and hopefully I am loaded to RAM as much as possible on boot. It is fast.
I attached a photo of my event manager and want to make sure it is running in the pupmode 13. Is that right?, I see pupmode 12...

Screenshots.jpg
Screenshots.jpg (83.26 KiB) Viewed 781 times

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
mikeslr
Posts: 2799
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 173 times
Been thanked: 841 times

Re: Using RAM, less or more?

Post by mikeslr »

@gychang,

When booted from a USB-Key, the default PupMode is 13. But when booted from a Hard-drive, the default PupMode is written as PupMode 12. In order to convert to PupMode 13 --so that Puppy Even Manager will offer the option to never automatically Save (or change the Save Interval) you have to edit the Kernel (if grub4dos) or Linux (if grub(2)) line of the boot Stanza and reboot. That's hinted at in the instructions.

E.g. Linux Line as originally written:

linux /fossa64/vmlinuz psubdir=/fossa64 pmedia=atahd pfix=fsck

as edited:

linux /fossa64/vmlinuz psubdir=/fossa64 pmedia=ataflash pfix=fsck

Colored for emphasis only.
Grub4dos's line would be the same except begin with the command 'kernel' rather than 'linux'.

If there is no pmedia= argument at all, add one.

User avatar
houndstooth
Posts: 226
Joined: Sun Jul 17, 2022 9:41 am
Location: U.S.A.
Has thanked: 12 times
Been thanked: 17 times

Re: Using RAM, less or more?

Post by houndstooth »

trawglodyte wrote: Mon Jan 15, 2024 1:40 pm

I've noticed in online forums (not necessarily this one, just in general) it seems there are many people who feel using RAM is bad. I think this comes from them reading other content specific to people with very limited amounts of RAM who legitimately need to keep their RAM use down.

It's not intrinsically bad but waste is, like gluttony & sloth, driving a Hummer to go pick up groceries for yourself. The metaphor invades multiple life dimensions. Most people are of the mindset of using it if you have it, & even in liberal environments are inclined to selectively care about the environment, waste, & engineering excellence. Besides, when you do more with less it just feels right.

To justify you have to being doing more that is empirically better. For example, I spend a lot of time loading & unloading browsers. If I had a hibernating machine 32G with them all running or at least installed at the same time, I'd probably save at least an hour each day I use computer, easily justifiable.

atm I have just 3GB on a device shipped with 64 Windows 7. It's fine so long as I don't login to Facebook or Twitter.

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Using RAM, less or more?

Post by trawglodyte »

houndstooth wrote: Wed Jan 17, 2024 1:17 am

atm I have just 3GB on a device shipped with 64 Windows 7. It's fine so long as I don't login to Facebook or Twitter.

If it stops you from logging into Facebook and Twitter, your RAM is doing you a favor. That's good RAM!

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

User avatar
Jasper
Posts: 1606
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 689 times
Been thanked: 361 times

Re: Using RAM, less or more?

Post by Jasper »

@trawglodyte

Have you heard of Wirth's Law?

That might explain why we all seem to need more 'grunt' with our workloads :lol:

dimkr
Posts: 1931
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 37 times
Been thanked: 855 times

Re: Using RAM, less or more?

Post by dimkr »

Every time you run an executable the kernel caches it in RAM so next time you run it, it doesn't have to read from disk again. Higher RAM consumption? Yes. Application startup time? Faster.

(Another example: if the browser remembers the content of the page you viewed before the current one, you can navigate back to it without having to send a request again and wait for the page content to be received and parsed.)

If you're running low on RAM, the kernel evicts some cache or can't cache all frequently accessed files, making these files slower to read.

Don't assume that higher RAM consumption is 'bad' or indicative of worse performance, because this is true only if you're really running low on RAM (don't have enough for use by applications plus enough to have cache that compensates for slow reading from disk.

User avatar
houndstooth
Posts: 226
Joined: Sun Jul 17, 2022 9:41 am
Location: U.S.A.
Has thanked: 12 times
Been thanked: 17 times

Re: Using RAM, less or more?

Post by houndstooth »

Maybe the pig is the developer who thinks we have all that ram to waste. If it releases automatically, how is a user to know before it's too late? It's like your daddy making all your decisions for you.

dimkr
Posts: 1931
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 37 times
Been thanked: 855 times

Re: Using RAM, less or more?

Post by dimkr »

houndstooth wrote: Wed Jan 17, 2024 3:17 pm

Maybe the pig is the developer who thinks we have all that ram to waste. If it releases automatically, how is a user to know before it's too late? It's like your daddy making all your decisions for you.

Before you begin to insult others, read about:

  1. vm.swappiness
  2. OOM killer
  3. Page cache + readahead
  4. vm.vfs_cache_pressure, vm.dirty_ratio and /proc/sys/vm/drop_caches

This "daddy" makes pretty good decisions and every major OS or kernel has a "daddy" for many years, otherwise you'd know it doesn't exist and constantly run into problems.

If you believe that Linux is making bad decisions, try to echo 3 > /proc/sys/vm/drop_caches every 5 minutes and you'll see how sluggish everything becomes, although RAM usage is lower.

d-pupp
Posts: 192
Joined: Tue Nov 22, 2022 9:11 pm
Location: Canada
Has thanked: 91 times
Been thanked: 40 times

Re: Using RAM, less or more?

Post by d-pupp »

I use to think high ram usage was a problem. However I have changed my mind.
I think this view of not using ram is a hold over from the days when computers didn't have much ram.
I now think the other way unused ram is wasted. What is the point of having it if it never gets used??

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Using RAM, less or more?

Post by trawglodyte »

@d-pupp

That's my current opinion too. It's like having a 4 bedroom house with 2 bathrooms and using never using 3 of the bedrooms or one of the bathrooms. What's the point of having them then?

It probably was dumb of me to upgrade from 16G RAM to 32G RAM. Maybe something will change, but right now I definitely don't need it.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

backi
Posts: 589
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 71 times
Been thanked: 65 times

Re: Using RAM, less or more?

Post by backi »

I think even 16 Gigs Ram is almost overkill for an "average" User.

My Rig has "only" 8 Gigs Ram.......even when .....for Example downloading several Videos from Youtube simultaneously into Ram....and/or streaming it.....never ran out of Ram.

There might be Cases when you need more Ram......but i never had any use for it.

I agree.......not using Ram..... if enough is available..... is a waste of (fast) Resources/Possibilities.....makes no Sense.

User avatar
houndstooth
Posts: 226
Joined: Sun Jul 17, 2022 9:41 am
Location: U.S.A.
Has thanked: 12 times
Been thanked: 17 times

Re: Using RAM, less or more?

Post by houndstooth »

dimkr wrote: Wed Jan 17, 2024 3:28 pm

This "daddy" makes pretty good decisions and every major OS or kernel has a "daddy" for many years, otherwise you'd know it doesn't exist and constantly run into problems.

I do not blame an individual developer but the system. Structurally there is a drive to use more energy & resources to achieve the same functionality, including the profit motive. It can't be all security. That would be ridiculous.

You want a responsible dad who is chill not some kind of dictator.

My bootloader will be called Vladimir Bootin' for XP/Linux dual-boot, not some kind of piggy endeavor. You can eat your 1000 tracking cookies in the last seven days.

Attachments
CookieMonster.jpeg
CookieMonster.jpeg (22.79 KiB) Viewed 354 times
User avatar
houndstooth
Posts: 226
Joined: Sun Jul 17, 2022 9:41 am
Location: U.S.A.
Has thanked: 12 times
Been thanked: 17 times

Re: Using RAM, less or more?

Post by houndstooth »

trawglodyte wrote: Fri Jan 19, 2024 1:42 pm

It probably was dumb of me to upgrade from 16G RAM to 32G RAM. Maybe something will change, but right now I definitely don't need it.

I do not see Barry's ingenious idea commonly elsewhere, but Ubuntu's been put into ram unsquashed:

With 32GB I would try it.

This 3GB machine goes to 8GB with discontinued, pricey SO-DIMM so the most reasonable is 4GB, but I won't do that until I am prepared for it to break.

Post Reply

Return to “Beginners Help”