Is pfix=nocopy no longer affecting ram usage when booting? (BookwormPup64)

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
bigpup
Moderator
Posts: 6405
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 760 times
Been thanked: 1326 times

Is pfix=nocopy no longer affecting ram usage when booting? (BookwormPup64)

Post by bigpup »

I am booting BookwormPup64 10.0.4 which should be close to using the very latest changes in how Puppy works.

I changed the boot menu and added pfix=nocopy so the BookwormPup64 SFS files do not load into RAM.
When it boots it says they are loading into the file system, but not into RAM.
So it seems the nocopy command is working.

However, after booting to a working desktop.
When I check on how much RAM is being used.
It is reporting the same amount used, as when it boots and does load the SFS files into RAM.

Like anything.

Can someone else try this and see what they get?
Please try it in BookwormPup64 10.0.4

Older Puppy versions may not show this affect.

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
amethyst
Posts: 2357
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 477 times

Re: Is pfix=nocopy no longer affecting ram usage when booting? (BookwormPup64)

Post by amethyst »

The default is that the puppy files are COPIED to ram as is not extracted to RAM. So what you have is that a part of RAM is used to contain/save the COPIED files which still need to be extracted to be used but because the sfs's are sitting in RAM, files will extract and open slightly faster when accessed (in my experience it's not much faster). The main advantage of the puppy sfs files copied to RAM is of course that you can work totally in RAM and disconnect all other drives. You need enough RAM though to do this. On bootup only the essential system files are extracted and loaded into RAM although all the puppy sfs files are mounted at startup.

dimkr
Posts: 2006
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 38 times
Been thanked: 915 times

Re: Is pfix=nocopy no longer affecting ram usage when booting? (BookwormPup64)

Post by dimkr »

This depends on the way you measure RAM consumption, because different tools have different formulas. For example, lxtask doesn't include cache in its measurement unless you tick the box, and there's where the SFSs copied to RAM sit (it will show the same number unless you untick this checkbox).

The difference between pfix=nocopy and booting without it is that SFSs don't get copied to a tmpfs before mounting. The squashfs fragment cache and the page cache exist and consume RAM regardless of pfix=nocopy, so the difference in RAM consumption should be the size (on disk) of the SFSs copied - a 1 MB sized SFS that gets copied to RAM adds 1 MB of RAM consumption (plus some minimal overhead) and not the size of the decompressed files or something like that.

In addition, make sure you echo 3 > /proc/sys/vm/drop_caches before you measure RAM consumption because some RAM is "wasted" on page cache, every time you read a file or run some application.

The behavior of pfix=nocopy hasn't changed across Puppy releases, the only related thing that did change lately is https://github.com/puppylinux-woof-CE/woof-CE/pull/3783, which makes initrd make smarter decisions when RAM is not sufficient to copy all SFSs. If there's enough space for either adrv or fdrv, it will copy adrv to RAM and not fdrv, because adrv is accessed more frequently and likely to contain an application that can benefit from faster startup time, while fdrv is used rarely (only during firmware loading).

User avatar
wizard
Posts: 1651
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2203 times
Been thanked: 515 times

Re: Is pfix=nocopy no longer affecting ram usage when booting? (BookwormPup64)

Post by wizard »

@bigpup

With clean boot of 10.0.4 and looking at "free" and "top" in terminal, plus Conky's mem, I see about 750mb drop in ram usage with pfix=nocopy

wizard

Big pile of OLD computers

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

Re: Is pfix=nocopy no longer affecting ram usage when booting? (BookwormPup64)

Post by bigpup »

In addition, make sure you echo 3 > /proc/sys/vm/drop_caches before you measure RAM consumption because some RAM is "wasted" on page cache, every time you read a file or run some application.

thanks, but I am not going for exact readings only ball park changes in RAM usage.

Well, I guess it really does matter what you are using to get memory usage readings.

I was using Pup-Sysinfo to give a readout of memory usage.

This is what it is showing to me on my specific computer after getting to a working desktop:

Pup-Sysinfo report:

using nocopy
Actual Used RAM 714 MB Used - (buffers + cached + reclaimable)
Actual Free RAM 31142 MB Free + (buffers + cached + reclaimable)

Normal boot
Actual Used RAM 710 MB Used - (buffers + cached + reclaimable)
Actual Free RAM 31146 MB Free + (buffers + cached + reclaimable)

So maybe my little test is showing some tweaking needed in Pup-Sysinfo program. :idea:
Yes, those are the readouts I am getting with Pup-Sysinfo.
They do look wrong for what they should be showing.

I seem to remember, in other Puppy versions, doing the same test, and getting much different readings for actual RAM used.
Using nocopy always showed a good size drop in actual ram usage.

But this topic and the info that dimkr provided about how SFS's are loaded.
I now have a much better understanding of what should be happening.

Thanks to all for helping!
.
.

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

Post Reply

Return to “Users”