How to flush or unload RAM?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
sonny
Posts: 725
Joined: Mon Feb 15, 2021 4:50 pm
Has thanked: 486 times
Been thanked: 173 times

How to flush or unload RAM?

Post by sonny »

    Fresh booting

    memory-then.png
    memory-then.png (21.82 KiB) Viewed 1107 times

      After hours / days / weeks of working

      memory-now.png
      memory-now.png (22.31 KiB) Viewed 1107 times

      Any idea how to flush or unload the 6.848GB from RAM (7.55GB - 702MB)
      without saving or rebooting in PM13 (like "Eternal Sunshine of the Spotless Mind")?
      Tried BleachBit to no avail.

      In Windows 10, some simply do this:

      windows.png
      windows.png (28.61 KiB) Viewed 1107 times
      Last edited by sonny on Tue Jan 02, 2024 8:50 am, edited 1 time in total.
      User avatar
      Jasper
      Posts: 2102
      Joined: Wed Sep 07, 2022 1:20 pm
      Has thanked: 858 times
      Been thanked: 491 times

      Re: Flush or Unload Memory?

      Post by Jasper »

      @sonny

      You could try this script and see if it helps you.

      https://www.mediafire.com/file/twnzyg49 ... m.zip/file

      Just extract the zipped file and then right click, run in terminal.

      sonny
      Posts: 725
      Joined: Mon Feb 15, 2021 4:50 pm
      Has thanked: 486 times
      Been thanked: 173 times

      Re: Flush or Unload Memory?

      Post by sonny »

      Jasper wrote: Tue Jan 02, 2024 8:46 am

      @sonny

      You could try this script and see if it helps you.

      https://www.mediafire.com/file/twnzyg49 ... m.zip/file

      Just extract the zipped file and then right click, run in terminal.

      I did but it was ineffective and insignificant.

      User avatar
      mikeslr
      Posts: 2975
      Joined: Mon Jul 13, 2020 11:08 pm
      Has thanked: 179 times
      Been thanked: 926 times

      Re: Flush or Unload Memory?

      Post by mikeslr »

      Maybe CleanRAM by Argolance, viewtopic.php?p=25645&sid=c5bc3b898e3a2 ... d4c#p25645

      But how are your running your Puppy? With 7.55 Gb in RAM, it appears that you are not using a SaveFile/Folder, nor any SFSes nor AppImages --each of which are mounted rather than loaded into RAM-- nor portables which are linked to your OS. All of the foregoing just create links to their file-systems, copying components into RAM as needed and unloaded when no longer in use.

      My best guess is that you've stuffed everything into 'alphabet drives' --e.g., adrv.sfs, ydrv.sfs-- which are copied entirely into RAM on bootup; or have Remastered so that your puppy_version.sfs includes everything and are not using the 'nocopy' argument in your boot-stanza.

      sonny
      Posts: 725
      Joined: Mon Feb 15, 2021 4:50 pm
      Has thanked: 486 times
      Been thanked: 173 times

      Re: Flush or Unload Memory?

      Post by sonny »

      mikeslr wrote: Tue Jan 02, 2024 4:42 pm

      Maybe CleanRAM by Argolance, viewtopic.php?p=25645&sid=c5bc3b898e3a2 ... d4c#p25645

      But how are your running your Puppy? With 7.55 Gb in RAM, it appears that you are not using a SaveFile/Folder, nor any SFSes nor AppImages --each of which are mounted rather than loaded into RAM-- nor portables which are linked to your OS. All of the foregoing just create links to their file-systems, copying components into RAM as needed and unloaded when no longer in use.

      My best guess is that you've stuffed everything into 'alphabet drives' --e.g., adrv.sfs, ydrv.sfs-- which are copied entirely into RAM on bootup; or have Remastered so that your puppy_version.sfs includes everything and are not using the 'nocopy' argument in your boot-stanza.

      Thank you, Sir Mike.
      I did and it was insignificant.
      No, I use 'nocopy' all the way since it's more relevant today (USB, SSD, & other flash media are running so much faster these days).

      Note: This case is for the default stock Fossapup64 for 'non-nocopy' and PM13, not DARKPUPPY & DARKPUPPY BE ('nocopy' by default).

      Last edited by sonny on Tue Jan 02, 2024 5:18 pm, edited 1 time in total.
      User avatar
      Marv
      Posts: 454
      Joined: Fri Dec 20, 2019 3:09 am
      Has thanked: 215 times
      Been thanked: 122 times

      Re: Flush or Unload Memory?

      Post by Marv »

      The fact that memory use grows with time to me points the finger at cache. Browsers are a big, but not the only offender here. Without knowing details on your install and browsers I can't point to specific locations but a file search for cache (and/or ".cache" should find the locations. Have a look at what is in them. Basically all cache contents can be safely deleted and it is pretty simple to write a script to do that and execute it manually or crond it. I have all my browsers set to clear cache on shutdown and that pretty much takes care of it for me.

      It could be a memory leak but it's simple to check and deal with the cache bloat first.

      My pups: LxPupSc64 and Voidpup64 with LXDE ydrv and synaptics touchpad drivers, both using small savefiles for customizations. Ydrv based NoblePup64 and Fossapup64-small (both LXDE/PCManFM with no savefiles). No fdrvs throughout. :thumbup2:

      sonny
      Posts: 725
      Joined: Mon Feb 15, 2021 4:50 pm
      Has thanked: 486 times
      Been thanked: 173 times

      Re: Flush or Unload Memory?

      Post by sonny »

      Marv wrote: Tue Jan 02, 2024 5:07 pm

      The fact that memory use grows with time to me points the finger at cache. Browsers are a big, but not the only offender here. Without knowing details on your install and browsers I can't point to specific locations but a file search for cache (and/or ".cache" should find the locations. Have a look at what is in them. Basically all cache contents can be safely deleted and it is pretty simple to write a script to do that and execute it manually or crond it. I have all my browsers set to clear cache on shutdown and that pretty much takes care of it for me.

      It could be a memory leak but it's simple to check and deal with the cache bloat first.

      Even with zero browsing, processes like copying and pasting (large) files, compiling, making pets and sfses, and stuff will quickly fill the RAM.

      User avatar
      mikeslr
      Posts: 2975
      Joined: Mon Jul 13, 2020 11:08 pm
      Has thanked: 179 times
      Been thanked: 926 times

      Re: How to flush or unload RAM?

      Post by mikeslr »

      The graphic in your OP seems to be conky --guessing as I don't use it.

      I wonder if there's a bug, or somehow the code it uses to calculate RAM usage has been broken?

      What do Menu>System>Htop System Process Viewer, or Menu>System>Pupsys-Info, click Devices>Memory tell you?

      sonny
      Posts: 725
      Joined: Mon Feb 15, 2021 4:50 pm
      Has thanked: 486 times
      Been thanked: 173 times

      Re: How to flush or unload RAM?

      Post by sonny »

      mikeslr wrote: Tue Jan 02, 2024 10:21 pm

      The graphic in your OP seems to be conky --guessing as I don't use it.

      I wonder if there's a bug, or somehow the code it uses to calculate RAM usage has been broken?

      What do Menu>System>Htop System Process Viewer, or Menu>System>Pupsys-Info, click Devices>Memory tell you?

      Is this Conky's 'broken' RAM usage calculation that you mentioned?

      PSI-vs-Conky.jpg
      PSI-vs-Conky.jpg (78.07 KiB) Viewed 955 times
      some1
      Posts: 86
      Joined: Wed Aug 19, 2020 4:32 am
      Has thanked: 18 times
      Been thanked: 15 times

      Re: How to flush or unload RAM?

      Post by some1 »

      sonny wrote: Tue Jan 02, 2024 6:05 pm

      Even with zero browsing, processes like copying and pasting (large) files, compiling, making pets and sfses, and stuff will quickly fill the RAM

      Stuff are kept in RAM/cached for potential fast reuse/
      re-access .
      The system manages cache-swapping.
      The system manages storage-IO.

      Why do you want to clear the RAM/caches?

      sonny
      Posts: 725
      Joined: Mon Feb 15, 2021 4:50 pm
      Has thanked: 486 times
      Been thanked: 173 times

      Re: How to flush or unload RAM?

      Post by sonny »

      some1 wrote: Wed Jan 03, 2024 12:38 am
      sonny wrote: Tue Jan 02, 2024 6:05 pm

      Even with zero browsing, processes like copying and pasting (large) files, compiling, making pets and sfses, and stuff will quickly fill the RAM

      Stuff are kept in RAM/cached for potential fast reuse/
      re-access .
      The system manages cache-swapping.
      The system manages storage-IO.

      Why do you want to clear the RAM/caches?

      1. 'In case' I need to use it for RAM-intensive apps
      2. Because seeing the longer memory bar is terrifying?
        :shock:
      User avatar
      mikewalsh
      Moderator
      Posts: 6185
      Joined: Tue Dec 03, 2019 1:40 pm
      Location: King's Lynn, UK
      Has thanked: 803 times
      Been thanked: 1994 times

      Re: How to flush or unload RAM?

      Post by mikewalsh »

      @mikeslr :-

      I understand your reasoning vis-a-vis that 7.5 GB in RAM, and I see where you're coming from.

      However, I quite frequently have anywhere between 6-12 GB RAM in use during a session.....composed of perhaps 4-5 browsers all open at the same time, and maybe half-a-dozen or so other apps multi-tasking in the background. It's not hard to do, though with 32GB of the stuff, an almost 4GHz 9th-gen quad-core Pentium 'Gold' and over 5TB+ of fast drive storage, the system barely notices it.

      I don't use "alphabet" drvs. Just a bog-standard save-folder.....

      (shrug...)

      Mike. ;)

      User avatar
      mikeslr
      Posts: 2975
      Joined: Mon Jul 13, 2020 11:08 pm
      Has thanked: 179 times
      Been thanked: 926 times

      Re: How to flush or unload RAM?

      Post by mikeslr »

      Sonny, the difference between the amount of RAM used as reported by Pupsys-Info and Conky in the graphics of your last post could just be how those applications are doing the calculations; in particular, how it calculates the effect of cached files.

      But I assume your screen-shots were taken after a reboot. If that's the case, the only way to tell if cache is being cleared is to run your computer 'normally' for a while, then use one of the cache cleaning techniques/applications and compare the results again, I know that on my systems CleanRAM does clear cache. But not entirely: remember on boot-up the compressed 'alphabet drives' and compressed Puppy's core SFS --unless the 'nocopy' option is used-- are copied into RAM cache. After running CleanRAM, its computations will still reflect their presence.

      sonny
      Posts: 725
      Joined: Mon Feb 15, 2021 4:50 pm
      Has thanked: 486 times
      Been thanked: 173 times

      Re: How to flush or unload RAM?

      Post by sonny »

      mikeslr wrote: Wed Jan 03, 2024 2:20 pm

      Sonny, the difference between the amount of RAM used as reported by Pupsys-Info and Conky in the graphics of your last post could just be how those applications are doing the calculations; in particular, how it calculates the effect of cached files.

      But I assume your screen-shots were taken after a reboot. If that's the case, the only way to tell if cache is being cleared is to run your computer 'normally' for a while, then use one of the cache cleaning techniques/applications and compare the results again, I know that on my systems CleanRAM does clear cache. But not entirely: remember on boot-up the compressed 'alphabet drives' and compressed Puppy's core SFS --unless the 'nocopy' option is used-- are copied into RAM cache. After running CleanRAM, its computations will still reflect their presence.

      Sir Mike, thank you for your reply.
      I guess 'nocopy' is more relevant today (RAM speed vs. SSD speed in real operation).
      And last time I checked, a 20-year-old PC with HDD and a 10-year-old PC
      with smaller SSD had comparable prices.

      Post Reply

      Return to “Users”