Cleaning the CACHE and TEMP. [SOLVED]

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
pp4mnklinux
Posts: 1125
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 632 times
Been thanked: 281 times
Contact:

Cleaning the CACHE and TEMP. [SOLVED]

Post by pp4mnklinux »

Hello everybody:

This could be a non-important question, because cache and temp are "important" folders to speed browsing and pc work, but from time to time my free space indicator, turns RED showing I have little space.

I can increase the savefile size, but I need to mantein it small to make easy and fast backups.

The question is: Is there anyway (program, config....) that allow you to delete these "innecessary files" from time to time (when u start the computer, wehn you restart it, when you click on this program, at a specific moment/time ... ??

I must tell you that it is not a big problem to delete this files manually, but I like to automatice it if possible.

THANKS A LOT IN ADVANCE.- :thumbup:

Last edited by pp4mnklinux on Wed May 10, 2023 5:33 am, edited 4 times in total.
User avatar
amethyst
Posts: 2414
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 504 times

Re: Cleaning the CACHE and TEMP.

Post by amethyst »

Browsing cache (internet browsers) are normally the main culprits. The idea is to get the cache entries out of the running operating system so that it does not affect your save file. You can move the browser cache (which is normally located in /root/.cache to /initrd/mnt/dev_save (/mnt/home) and symlink it back to its original location OR you can use a portable browser.

User avatar
pp4mnklinux
Posts: 1125
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 632 times
Been thanked: 281 times
Contact:

Re: Cleaning the CACHE and TEMP.

Post by pp4mnklinux »

Thanks, but I have this configured correctly, the problem appears witn non browser files, so I need to delete them manually.

Thanks a lot for your help.

Have a nice day.

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

Re: Cleaning the CACHE and TEMP.

Post by amethyst »

pp4mnklinux wrote: Tue May 09, 2023 7:06 am

Thanks, but I have this configured correctly, the problem appears witn non browser files, so I need to delete them manually.

Thanks a lot for your help.

Have a nice day.

Files in /tmp won't be part of the save file bit it will sit in RAM for the session. What is being affected is the ramdisk (50% of your installed RAM is normally allocated for RAMDISK storage during a session). You should use a swap file if you tend to run out of memory...

User avatar
pp4mnklinux
Posts: 1125
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 632 times
Been thanked: 281 times
Contact:

Re: Cleaning the CACHE and TEMP.

Post by pp4mnklinux »

Thanks, but I have enough RAM, I never have more than 7Gb used and I have much more, so what I'm interested is about some program or config to delete this files automativaly.

Thanks again for your answer.

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

Re: Cleaning the CACHE and TEMP.

Post by amethyst »

Use the remove command, make a script. However, deleting stuff in /tmp may be dangerous in terms of system operation and stability. What is your current setup, in which PUPMODE are you operating? Since you have lots of RAM, you should run in a mode that does not write to the save file continuously.

User avatar
pp4mnklinux
Posts: 1125
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 632 times
Been thanked: 281 times
Contact:

Re: Cleaning the CACHE and TEMP.

Post by pp4mnklinux »

Grub4dos

Pup 13

F96CE_XFCE_FUSILLI 4.4

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

Re: Cleaning the CACHE and TEMP.

Post by amethyst »

Did you make the time saving interval 0 for never and tick the Ask at shutdown box in event manager?

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

Re: Cleaning the CACHE and TEMP.

Post by mikewalsh »

@pp4mnklinux :-

I have to agree with Nic here. Caution MUST be exercised when deleting stuff from /tmp, since many Puppy applications - including some of my own creations - make use of /tmp while they're up-and-running.

So be careful just what you're deleting. If you're at all unsure about something.....leave it WELL ALONE!

Stuff in /root/.cache can usually be deleted without any lasting ill-effects, since most apps that use it will simply re-create their cache items the next time they run.

Mike. ;)

dimkr
Posts: 2420
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1202 times

Re: Cleaning the CACHE and TEMP.

Post by dimkr »

The files in /tmp are non-persistent, they're gone when you reboot and never get saved to your save file. There's no need to delete files from /tmp unless you have a buggy application which creates temporary files but doesn't delete them.

User avatar
pp4mnklinux
Posts: 1125
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 632 times
Been thanked: 281 times
Contact:

Re: Cleaning the CACHE and TEMP.

Post by pp4mnklinux »

Thanks everybody for your answers.

I know temporary files are deleted when restart, the problem is I used to never shut down my pc, jaja.

What I do is suspend it so temp files are not deleted (I think).

The only solution is to increase the size of my savefile.

There is no space problem about make it 32Gb , only when doing a back up, it is going to need a lot of time.

Thanks

Last edited by pp4mnklinux on Tue May 09, 2023 1:57 pm, edited 1 time in total.
User avatar
amethyst
Posts: 2414
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 504 times

Re: Cleaning the CACHE and TEMP.

Post by amethyst »

pp4mnklinux wrote: Tue May 09, 2023 12:37 pm

Thanks everybody for your answers.

I know temporary files are deleted when restart, the problem is I used to never shut down my pc, jaja.

What I do is suspend it so temp files are not deleted (I think).

The only solution is to increase the size of my savefile.

There is no space problem about make it 32Gb , only when doing a back up, it is going to need a lot of time.

Thanks

The files in /tmp has nothing to do with your save file as mentioned before. Your problem is not the size of your save file but with the available RAM for storing data during a session. Operate with a swap file as suggested before.

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

Re: Cleaning the CACHE and TEMP.

Post by mikewalsh »

dimkr wrote: Tue May 09, 2023 12:24 pm

The files in /tmp are non-persistent, they're gone when you reboot and never get saved to your save file. There's no need to delete files from /tmp unless you have a buggy application which creates temporary files but doesn't delete them.

Very true. Deletion of /tmp files IS pretty pointless.....unless, as you say, there's summat that just doesn't want to go when it should. Not that I've ever seen such, mind you...and even then, it should disappear anyway following a re-boot.

The clue's in the name. 'Tmp' = 'Temporary'.

Mike. ;)

User avatar
pp4mnklinux
Posts: 1125
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 632 times
Been thanked: 281 times
Contact:

Re: Cleaning the CACHE and TEMP.

Post by pp4mnklinux »

Testing.-

I create a swap file (the maximum size It permits to me... about 8gb) and I'll tell you what happens.

Thanks a lot

edited after having create the swap file-----------------------------

I created the swap file (8-Gb) and now I`m running 10 programs at the same time and it looks no problem... Let's see what happen.- I'll tell you, but till now it looks nice.

Second image.-

amethyst wrote: Tue May 09, 2023 1:00 pm
pp4mnklinux wrote: Tue May 09, 2023 12:37 pm

Thanks everybody for your answers.

I know temporary files are deleted when restart, the problem is I used to never shut down my pc, jaja.

What I do is suspend it so temp files are not deleted (I think).

The only solution is to increase the size of my savefile.

There is no space problem about make it 32Gb , only when doing a back up, it is going to need a lot of time.

Thanks

The files in /tmp has nothing to do with your save file as mentioned before. Your problem is not the size of your save file but with the available RAM for storing data during a session. Operate with a swap file as suggested before.

User avatar
sucuklu yumurta
Posts: 159
Joined: Thu Mar 09, 2023 3:12 am
Location: France
Has thanked: 321 times
Been thanked: 27 times

Re: Cleaning the CACHE and TEMP. [in process]

Post by sucuklu yumurta »

I made it a habit on the cache and temp browser side
about:config
browser.cache.disk.enable false
browser.cache.memory.enable false

Acer Aspire One AO751h Netbook Intel Atom CPU Z520 1.33 GHz:1-1 core 2 GB+2 GB Swap SSD. Sony 5200 mAh: BullseyePup 9.1.0 Lite on Kingston SSD Frugal
Acer Aspire 3 A315-58-34HD 8 GB DDR4 4.10 GHz Intel Core i3-1115G4 CPU 2-4 128 GB SSD: BookwormPup64

User avatar
pp4mnklinux
Posts: 1125
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 632 times
Been thanked: 281 times
Contact:

Re: Cleaning the CACHE and TEMP. [in process]

Post by pp4mnklinux »

Firs of all, thanks everybody for your help and suggestions:

In the end, I decided to increase the size of the savefile to 4.4Gb.- I have enough space and the solutions didn't solve all my problem.

I had only 521Mb free when starting F96CE_XFCE_FUSILLI 4.4 so it changes to red inmediatelly.

Create swap file (8Gb) mantein de space of this savefile but increase excesivelly the starting time or some apps (I for me time is money , haha... seconds included)

Configure browsers to not save cache, make them run a little bit slow, so .... I forgot it.

So my solution was increase the size of the save file, it is no so big that makes it difficult to copy fast, it is no so small it gives me problems.

SOLVED.

THANKS .-

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

Re: Cleaning the CACHE and TEMP. [in process]

Post by amethyst »

pp4mnklinux wrote: Wed May 10, 2023 5:32 am

Firs of all, thanks everybody for your help and suggestions:

In the end, I decided to increase the size of the savefile to 4.4Gb.- I have enough space and the solutions didn't solve all my problem.

I had only 521Mb free when starting F96CE_XFCE_FUSILLI 4.4 so it changes to red inmediatelly.

Create swap file (8Gb) mantein de space of this savefile but increase excesivelly the starting time or some apps (I for me time is money , haha... seconds included)

Configure browsers to not save cache, make them run a little bit slow, so .... I forgot it.

So my solution was increase the size of the save file, it is no so big that makes it difficult to copy fast, it is no so small it gives me problems.

SOLVED.

THANKS .-

To save RAM at bootup, add the pfix=nocopy parameter to your boot configuration file. If you have enough RAM, Puppys default behaviour is to copy the Puppy files to RAM at bootup. In my experience this is unnecessary and does not make much difference in terms of performance (and a waste of available RAM). Booting time will also be longer due to the copying. Whether you require a swap file or not will depend on how much RAM you have available and your specific usage. More available RAM = faster overall performance. I'm a minimal user and do not have a save file nor swap file.

Gnimmelf
Posts: 130
Joined: Fri Aug 21, 2020 5:01 pm
Has thanked: 69 times
Been thanked: 9 times

Re: Cleaning the CACHE and TEMP. [SOLVED]

Post by Gnimmelf »

To save RAM at bootup, add the pfix=nocopy parameter to your boot configuration file

how to do that?

kindly Gnimmelf

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: Cleaning the CACHE and TEMP. [SOLVED]

Post by Jasper »

@Gnimmelf

Image

Gnimmelf
Posts: 130
Joined: Fri Aug 21, 2020 5:01 pm
Has thanked: 69 times
Been thanked: 9 times

Re: Cleaning the CACHE and TEMP. [SOLVED]

Post by Gnimmelf »

im not shure what im suposed to do? i deleted what whas in the black boxes and replaced it with "pfix=nocopy"
that didnt work - it broke the boot up :shock:

kindly Gnimmelf

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: Cleaning the CACHE and TEMP. [SOLVED]

Post by Jasper »

@Gnimmelf

Oops, the blacked out areas where the ID of my PC. I should have put an explanatory note.

The pfix=nocopy

should have been changed on the line

linux=

Gnimmelf
Posts: 130
Joined: Fri Aug 21, 2020 5:01 pm
Has thanked: 69 times
Been thanked: 9 times

Re: Cleaning the CACHE and TEMP. [SOLVED]

Post by Gnimmelf »

did it :thumbup2:

pfix=nocopy doesnt seem to make much of a difference....
what does it do? how can i see if it works?

just curious

kindly Gnimmelf

Feek
Posts: 398
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 54 times
Been thanked: 90 times

Re: Cleaning the CACHE and TEMP. [SOLVED]

Post by Feek »

Gnimmelf wrote: Sat May 13, 2023 11:54 am

pfix=nocopy doesnt seem to make much of a difference....
what does it do?

By default, Puppy copies its (read-only) .sfs files to ram. This will consume more RAM right from the start.

The pfix=nocopy argument causes Puppy not to copy these files to ram. It then accesses them as needed on your installation media (where these files reside).
This means that you will have more ram available, but it is usually at the expense of speed, since decompression on any media is usually slower (especially usb devices) than decompression in ram.

Post Reply

Return to “Users”