Keep your savefile slim and healthy

How to do things, solutions, recipes, tutorials
Message
Author
nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#46 Post by nooby »

Much appreciated. I should look into it ASAP
but knowing me I doubt that I am savvy enough to get it.

but very good you share such knowledge so Thanks
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Hugh
Posts: 138
Joined: Sat 24 Jun 2006, 21:53
Location: Imperial Warmongering Dystopia of Amerika

#47 Post by Hugh »

Two of my savefiles, one for Lupu and the
other for Slacko, began filling up quickly
so I mounted and examined the files to look
for the problem.

I found a hidden folder [root/.mozilla] and within it
found root/.mozilla/firefox or root/.mozilla/seamonkey
which both contained another folder called Crash Reports.
Within that folder is another folder Pending, which in
my case was about 200MB of files.

I deleted the Pending folder with all of those
reports and recovered over 200MB of space.

I searched around the save files looking for other
bloat and unnecessary stuff but couldn't find any-
thing suspicious.

In order to mount the Lupu save file from Slacko
I first had to change its permissions to enable
opening and searching. The Slacko save file was
already enabled to be opened from Lupu.

If any others have found areas of the save files
which are using up precious space needlessly
please share your findings!
Various Old Computers 100MHz - 1.9GHz
First Puppy: 2.00 Presently: TahrPup 6.0.3
HDD Filesystem: FAT32/ext3; Frugal Always

bill
Posts: 490
Joined: Wed 28 May 2008, 15:32

Re: Keep your savefile slim and healthy

#48 Post by bill »

bill wrote:Here is one that maybe a new user would like to tinker with.
This mod works well with this distro here:
https://archive.org/details/Puppy_Linux_lupu-520_110319

snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

#49 Post by snayak »

The biggest problem I am facing is, whatever is installed in /opt, takes space in savefile. :-(

I try to install the things which I manually compile and install using "make" and "make install" to /opt. All of them sits in savefile.

Is there a way to keep /opt out of savefile?

Sincerely,
Srinivas Nayak
[Precise 571 on AMD Athlon XP 2000+ with 512MB RAM]
[Fatdog 720 on Intel Pentium B960 with 4GB RAM]

[url]http://srinivas-nayak.blogspot.com/[/url]

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#50 Post by nic007 »

snayak wrote:The biggest problem I am facing is, whatever is installed in /opt, takes space in savefile. :-(

I try to install the things which I manually compile and install using "make" and "make install" to /opt. All of them sits in savefile.

Is there a way to keep /opt out of savefile?

Sincerely,
Srinivas Nayak
I believe save files should be kept to the absolute minimum size (only use to save customized settings). Rather use SFS add-ons for new programmes or install and then remaster. My save file is hardly ever bigger than 32MB. Most of the time I don't even use one.

snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

#51 Post by snayak »

Thanks nic007.

I didn't know that we can remaster the installed folder to a sfs and use it. Thanks. I will definitely try this.

However, One doubt I am not clear about.

Lets say a installed program "myapp", which has a file /etc/myapp.conf. Now after installation, in /opt it stays at /opt/myapp/etc/myapp.conf. Say, this file being a configuration file, automatically gets modified and being saved once the app starts to run.

[Some other files also may need be changed when the installed app runs.]

Now I will make a sfs of this program. When sfs loads, the app will be able to run nicely. Once the app quits, it shall modify and save /opt/myapp/etc/myapp.conf to use it next time.

My doubt is, will my remastered sfs gets modified here? If not, where shall the modified version of /opt/myapp/etc/myapp.conf gets stored? Does it gets stored in savefile? What happens if you don't use a savefile at all?


Will you please help me to clear my doubts?


Sincerely,
Srinivas Nayak
[Precise 571 on AMD Athlon XP 2000+ with 512MB RAM]
[Fatdog 720 on Intel Pentium B960 with 4GB RAM]

[url]http://srinivas-nayak.blogspot.com/[/url]

bill
Posts: 490
Joined: Wed 28 May 2008, 15:32

Keep your savefile slim and healthy

#52 Post by bill »

Here's the trick.
Attachments
savebydemandonly.jpg
(14.41 KiB) Downloaded 985 times

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#53 Post by mikeb »

Yes if you use a program that installs to say /opt but as an sfs then any configs can still be written in use but only those get stored in the save file. Two examples I use are libreoffice and adobe reader. They only add a meg or 3 to the save.

I don't have a save file but use archives of the ramdisk contents so keeping tidy is a very good idea. My saves are usually 5 - 50MB uncompressed . Add on programs are all sfs. Messy programs like browsers need close scrutiny to tame their habits.

mike

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#54 Post by nic007 »

snayak wrote:Thanks nic007.

I didn't know that we can remaster the installed folder to a sfs and use it. Thanks. I will definitely try this.

However, One doubt I am not clear about.

Lets say a installed program "myapp", which has a file /etc/myapp.conf. Now after installation, in /opt it stays at /opt/myapp/etc/myapp.conf. Say, this file being a configuration file, automatically gets modified and being saved once the app starts to run.

[Some other files also may need be changed when the installed app runs.]

Now I will make a sfs of this program. When sfs loads, the app will be able to run nicely. Once the app quits, it shall modify and save /opt/myapp/etc/myapp.conf to use it next time.

My doubt is, will my remastered sfs gets modified here? If not, where shall the modified version of /opt/myapp/etc/myapp.conf gets stored? Does it gets stored in savefile? What happens if you don't use a savefile at all?

When having a frugal install all changes/modifications to the system are stored in the save file. The base SFS and all other add-on SFS's are read-only and will not be altered during a session (they stay the same). So when you use the remaster programme from the menu it will mostly include everything on the save file by default, but not always. To ensure that all your settings, etc. get remastered, do this: When you use the remaster program from menu it will go through a few steps. You will get a window that the new root directory has been created in root/temp and you can change it. So open that temp directory and delete the root folder that the remaster programme has created and replace it with the root folder of your running system (so, click on home,go up one level and copy the root folder to the root/temp folder. Next screen will handle etc. Do the same with this but delete the hidden file called .xloaded after you had copied it. The resulting remaster should now have all the setting you have had previously and all programmes that you have had installed. So just replace your previous base SFS file with this newly remastered one and delete the old save file. When you boot this up you will have the same system you had but now everything is included (in other words you can actually run without a save file). As soon as you do more modifications, you will once again need a save file to save them...and so on. You can do remaster after remaster if you like. Note: before doing a remaster, you may want to delete or uninstall stuff first otherwise this will be included in the remastered SFS.


Sincerely,
Srinivas Nayak
Nic

snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

#55 Post by snayak »

Thanks Nic. It is really a nice idea. Worth trying out.

By the way, mike suggested
I don't have a save file but use archives of the ramdisk contents so keeping tidy is a very good idea. My saves are usually 5 - 50MB uncompressed . Add on programs are all sfs. Messy programs like browsers need close scrutiny to tame their habits.
How to archive ramdisk?
If browser is made sfs, how NOT to save browser accumulated temporary files/cache/virus etc in savefile?

Do we have any application that can detect the directories/files which need to be saved in savefile, and allows us to choose among them to save before we shutdown?

Sincerely,
Srinivas Nayak
[Precise 571 on AMD Athlon XP 2000+ with 512MB RAM]
[Fatdog 720 on Intel Pentium B960 with 4GB RAM]

[url]http://srinivas-nayak.blogspot.com/[/url]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#56 Post by mikeb »

How to archive ramdisk?
If browser is made sfs, how NOT to save browser accumulated temporary files/cache/virus etc in savefile?
Part one is a bit of a story .. my point was that I make save space saving a priority due to keep ram usage low...well I am a bit of a minimalist :)

The second point .... there have been users who do things like move and link the browser profile either out of the save file or into /tmp or use a tmpfs so everything disappears at shutdown.
There are posts on the subject but basically move and symlink back either manually or with a simple script.
I tend to just use browser preferences with the aim of minimising space and choose what gets stored.

mike

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#57 Post by fobq »

hi,
I still don't understand something.
When I make Gmap open "File system" it loads me the following directories:
usr, root, lib, bin, sbin, var, etc, opt. It is 677.5 MB all together.
(the biger ones are: usr 360 MB, root 216 MB, lib 84 MB)

I have a 1 GB savefile (.2fs) on the 4 GB sd1 partition (it is my home). There is 716 MB of free space in my savefile, so 308 MB is just occupied.

Where is that 667.5MB stored?
Which directories does that 308 MB consist of?

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#58 Post by mikeb »

The file system in its uncompressed form that resides in the sfs... the save file will also be included in that figure.

In other words a 150MB sfs is composed of ~350-450MB of files.
If you made a full install thats how big it would become.

mike

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#59 Post by fobq »

hi,
my savefile is continuously growing, however I install nothing. My firefox and seamonkey cache is set to 30 MB, I have a folder for downloads in /home. Yesterday, I had 730 MB of 1GB free space, now just 525.
It is interesting, because I am looking at my previous post in this topic: the size of "File system" in Gdmap was 667.5 MB I had 716MB free space.
Now, the "File system" is less - 658MB but I have less free space - 525MB
What is responsible for this growing? How could I prevent it?

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#60 Post by mikeb »

OK point gdmap into /initrd/pup_rw or if you have usb flash setup try /initrd/pup_ro1 as well.

See whats big....

Someone mentioned that sometimes running a file system check might recover space using the pfix=fsck option at boot

mike

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#61 Post by fobq »

fsck is used, here is my menu.lst

Code: Select all

title Puppy precise 5.7.1 (sda1/precise5.7.1frugal)
  uuid 1636d0f9-5ac7-4bec-af1c-b9832d101d44
  kernel /precise5.7.1frugal/vmlinuz   psubdir=precise5.7.1frugal pmedia=atahd pfix=fsck
  initrd /precise5.7.1frugal/initrd.gz
My cache dir. is all right. I suggest that my usr/lib directory could be the sinner. GDmap shows me files of 5-15 MB here. Could files somehow been dowloaded here? I have no other idea.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#62 Post by mikeb »

From another post it seems like t\you had files left in the trash which might account for the space loss.

mike

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#63 Post by fobq »

I found some suspicious files:

/root/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve81rb0.tmp_/dict-en.oxt/th_en_US_v2.dat (18mb)
What is this cache?

I just unloaded my browser's cache (now it is 1,4MB). What is it:
/root/.cache/mozilla/firefox/z4poujvs.default/Cache/_CACHE_003_ (16mb)

I have two big directories in pup_rw: /usr/lib (256MB) and /root (100MB)
the first one is clear, I checked the files in its subdirectories as weel, the last modification happened in December.

The most suspicious one is /root. If it is, it means, on Sunday, it just was 20MB. Is this size imaginable for root?

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#64 Post by mikeb »

Hmm i am not 100% if that open office cache is actually the file used or not../root is where addon on packages are kept..you could hide the file and see if it still works. Open office file structure is a bit of a confusing one.. By the way that's the thesaurus not the dictionary. If you don't need it remove it in settings rather than just delete.

Set browser cache to 0 and then clear it...it should then remain empty.
I have two big directories in pup_rw: /usr/lib (256MB)
...so this is empty ...you just giving the size of /usr/lib...sorry not quite sure if that is what you meant.

mike

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#65 Post by musher0 »

fobq wrote:I found some suspicious files:

/root/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve81rb0.tmp_/dict-en.oxt/th_en_US_v2.dat (18mb)
What is this cache?

I just unloaded my browser's cache (now it is 1,4MB). What is it:
/root/.cache/mozilla/firefox/z4poujvs.default/Cache/_CACHE_003_ (16mb)

I have two big directories in pup_rw: /usr/lib (256MB) and /root (100MB)
the first one is clear, I checked the files in its subdirectories as weel, the last modification happened in December.

The most suspicious one is /root. If it is, it means, on Sunday, it just was 20MB. Is this size imaginable for root?
Hello, fobq.

Susupicous ? hehe. Absolutely not ! They are all part of your system.

In particular the files in /initrd/pup_rw/: this directory is actually the original
read-and-write (rw) component of your Puppy. If you go in /initrd/, you'll also see
"pup_ro" (read-only) folders : the "ro" folders are the folders in the Puppy sfs file
and are read-only, they make your basic Puppy.

Technically, in Puppy, all "pup_ro" folders are in the unchangeable Puppy squash
(sfs). file and all "pup_rw" are in your editable "pupsave".?fs file.

The folders in "rw" are actually your active, "living", Puppy system. Puppy is made
so we don't actually work in/initrd/pup_rw/usr or /initrd/pup_rw/root, it would be too
cumbersome, so it has sort of an "identical twin" that appears to us users simply as
/root, /usr, etc.

20 Mb for an active /root ? No problem, I've got the same on my Puppy.

/root/.config/.openoffice/4/user/uno_packages/cache/uno_packages/sve81rb0.tmp_/dict-en.oxt/th_en_US_v2.dat (18mb)
is the American English Thesaurus used by your OpenOffice 4.
American English is a complex and articulate language, you know (where is the
tongue-in-cheek icon! ), it takes a lot of room on a disk, especially for synonyms
and such ! :)

/root/.cache/mozilla/firefox/z4poujvs.default/Cache/_CACHE_003_ (16mb). This is
one of Mozilla Firefox's caches. This one is for minor elements that do not go in
the usual /root/.mozilla/< your personal alphanum code> folder, for some reason.
I'm not a mozilla programmer, but all mozilla-family programs (seamonkey,
iceape, firefox, compozer, etc.) are made that way, with user folders in two places.

So I'd say your Puppy is quite healthy, nothing suspicious at all in it. I hope the
above helped in answering your questions.

BFN.
Last edited by musher0 on Fri 10 Jan 2014, 15:34, edited 1 time in total.

Post Reply