all-in-ram performnce: savefile & libreoffce sfs in ram too?

Booting, installing, newbie
Message
Author
dabruro
Posts: 8
Joined: Mon 08 Dec 2008, 19:03

all-in-ram performnce: savefile & libreoffce sfs in ram too?

#1 Post by dabruro »

I have a machine with 2GB RAM (and another with 1GB). I think that's enough that I should be able to have everything I need available in a ramdisk without waiting for hard drive access (except while booting). I pretty much just want to run Firefox(+Flash+Pdf) and LibreOffice and an occasional multimedia player.

When I install new software like Firefox (or even an updated version of SeaMonkey although I prefer FF because I don't need the composer/email/etc. components and I like the FF add-ons) it goes in my puppy save file, right? Can this be pre-loaded into the ram disk when i boot up in the future? And when I use a LibreOffice sfs file, can this be loaded into RAM as well so it can start up quickly when ever I need it? If not, why not, and is there any other way to get that kind of speed? After I read Firefox from my save file or LibreOffice from its sfs, does this at least get cached in RAM so it's faster next time in this session?

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

If you run Puppy from a multisession CD or DVD, any changes you make and programs you install are saved on the CD or DVD and loaded into RAM each time you boot. I've been running various Puppies from multisession DVDs in various computers without hard disk drives for around 7 years.

dabruro
Posts: 8
Joined: Mon 08 Dec 2008, 19:03

#3 Post by dabruro »

Thanks. Flash.

So, in order to get the speed of running entirely from RAM, I have to accept the initial slowness of loading everything (puppy sfs + save file + extra sfs for libreoffice) from a DVD every single time I boot? I can't speed this up by making use of my hard drive at all?

Isn't there some way to tell puppy to load *everything* into RAM even though some of it may be loaded from my hard drive?

(Also I think adding a session to a dvd carries some risk that if it fails, the entire disc, with all of my previous saved work, could become unreadable.)

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

dabruro wrote:Isn't there some way to tell puppy to load *everything* into RAM even though some of it may be loaded from my hard drive?
Even with a frugal install to the hard drive, the default behaviour is NOCOPY. The main sfs file is NOT loaded into RAM. Modern hard drives are fast enough that you shouldn't notice much difference, combined with whatever caching is happening.

You really don't want to start loading your extra sfs files into RAM. When unpacked, they expand to several times their size. You could quickly run out of RAM that you need to run the applications. Many users will have savefiles that are larger than their RAM.

And if you bring your savefile into RAM, you need to write it back out to disk at the end of the session. Flash drive users are familiar with this issue.

dabruro
Posts: 8
Joined: Mon 08 Dec 2008, 19:03

#5 Post by dabruro »

Whether beneficial or not, my question was *how* I could try loading everything into RAM (without burning my save file onto a multisession dvd/cd), assuming I've got a small save file and just one extra sfs and plenty more RAM than I need?

But also I'm a little puzzled by your statements because some of the main claims (quoted below) for the superiority of puppy to other distros is the speed of running solely from RAM -- are these claims just "marketing hype"? For what reasons is puppy faster than other distros, or is it really faster at all?

Here are some quotes:

"Puppy usually loads completely into RAM, which accounts for the incredible speed" -- http://puppylinux.com/about.htm

"Fast - Because Puppy is small, it can live in your PC's memory and be ready to quickly execute your commands, whereas in other systems, programs are first read from drive storage before being executed." -- http://puppylinux.org

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#6 Post by rcrsn51 »

dabruro wrote:Whether beneficial or not, my question was *how* I could try loading everything into RAM (without burning my save file onto a multisession dvd/cd), assuming I've got a small save file and just one extra sfs and plenty more RAM than I need?
By remastering. Or by picking one of the "fat" versions that have lots of software in their sfs.
"Puppy usually loads completely into RAM, which accounts for the incredible speed" -- http://puppylinux.com/about.htm
That was the case prior to Puppy 5. I suspect that many Puppy users believe that it still works that way. But if you use the "pfix=copy" boot option, you can get the old behaviour.
"Fast - Because Puppy is small, it can live in your PC's memory and be ready to quickly execute your commands, whereas in other systems, programs are first read from drive storage before being executed." -- http://puppylinux.org
I suspect that a lot of Puppy's speed comes from its smaller memory footprint. So there's more RAM available for applications.
are these claims just "marketing hype"?

Considering that some Puppy advertising still refers to "zip drives", you can see that marketing is not terribly high on the Puppy scale of importance.
or is it really faster at all?
Code is code. If you have a machine with lots of memory and you compare Ubuntu to Puppy when running an app like Firefox, I don't think that you would see much difference. Perhaps other users can comment on this.

dabruro
Posts: 8
Joined: Mon 08 Dec 2008, 19:03

#7 Post by dabruro »

So, by running from a multisession dvd, it does something that can't be done by any other method -- i.e. loading everything including your most recent save file into RAM? There isn't any boot option or something that will give similar behavior even though the media I'm on happens not to be optical&removable?
Last edited by dabruro on Mon 01 Oct 2012, 17:47, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#8 Post by rcrsn51 »

To my knowledge, there is not. But only BarryK could explain why. When this question has been asked before, the standard answer is "remaster".

dabruro
Posts: 8
Joined: Mon 08 Dec 2008, 19:03

#9 Post by dabruro »

Thanks for the info.

1. So, even if I boot from a usb flash drive with my files on there -- there isn't any way to run puppy that would allow me to remove the flash drive while puppy is running (and re-insert it before i shut down so puppy has somewhere to save the save file)?

2. Just so I understand, if I were to remaster while running with my save file and libreoffice sfs mounted, would the new single main sfs contain everything including the contents of the libreoffice sfs, or would that remain separate?

3. Also, I like to let firefox update itself automatically, so it doesn't make much sense to me to have it the main sfs since i'll end up updating it in my save file anyway and then the space it takes in the sfs is just wasted.

4. How much caching does puppy do, e.g. when I run a big program from an extra sfs or from my save file, then exit from it and run it again? Is the cache size or behavior adjustable?

5. For OpenOffice/LibreOffice, maybe I should just run its quickstart preload component if I want it to start up faster :-) I think firefox has a similar thing as an add-on (seamonkey or at least the original mozilla suite had one natively but i think ffx was considered too lightweight to need one).

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#10 Post by rcrsn51 »

dabruro wrote: 1. So, even if I boot from a usb flash drive with my files on there -- there isn't any way to run puppy that would allow me to remove the flash drive while puppy is running (and re-insert it before i shut down so puppy has somewhere to save the save file)?
Flash drives work in PUPMODE=13. Your current session uses a temporary RAM layer which is written back to the savefile at logout. (This is to minimize writes and theoretically extend the life of the device.) So if you turned off the periodic save feature, you might be able to remove the flash drive for the duration of the session. But I have never tested this. I prefer to run my flash drives in PUPMODE=12, where they work like a hard drive.
2. Just so I understand, if I were to remaster while running with my save file and libreoffice sfs mounted, would the new single main sfs contain everything including the contents of the libreoffice sfs, or would that remain separate?
I'm not sure. You might first need to unpack the libreoffice sfs and copy it into your filesystem.
3. Also, I like to let firefox update itself automatically, so it doesn't make much sense to me to have it the main sfs since i'll end up updating it in my save file anyway and then the space it takes in the sfs is just wasted.
There are two philosophies here. Lupu is NOT bundled with a big-boy browser for that very reason. However, other Puppies come with a browser package so it's immediately available when running from the Live CD.
4. How much caching does puppy do, e.g. when I run a big program from an extra sfs or from my save file, then exit from it and run it again? Is the cache size or behavior adjustable?
Don't know. But that's something that you can get a sense of by running the program several times during a session.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#11 Post by 8-bit »

In running Puppy completely from ram, one has to take into account the uncompressed size of the main puppy SFS file, the size of the pupsave file, and any additional SFS files loaded.
The total cannot be greater than the physical memory one has and also has to have room left to be able to run the applications.

It would be interesting to be able to load the applications as compressed ones into memory with on-the-fly expansion of the apps.
I do not know if it would be possible in puppy.
But I do know that apps can be made that automatically uncompress and run when accessed and recompress when closed.

I keep seeing statements of Puppy having a small footprint since the ISO is around 100 to 150 megs.
But after everything is uncompressed, just how much space does it need?
One might think that with a Puppy ISO being 100 to 150 megs, that 512 megs of ram would give one 300+ megs of free memory to use.
Puppy's small initial size is largely due to the type of compression used to pack up everything.
But imagine if you can, a Puppy that loads the compressed apps into memory and only uncompresses those when needed.

dabruro
Posts: 8
Joined: Mon 08 Dec 2008, 19:03

#12 Post by dabruro »

rcrsn51 wrote: Flash drives work in PUPMODE=13. Your current session uses a temporary RAM layer which is written back to the savefile at logout. (This is to minimize writes and theoretically extend the life of the device.) So if you turned off the periodic save feature, you might be able to remove the flash drive for the duration of the session. But I have never tested this. I prefer to run my flash drives in PUPMODE=12, where they work like a hard drive.
For flash media, doesn't it use that temporary ram layer only for *writes*? My understanding is that it won't preload the save file from the flash drive but instead will keep accessing it on the flash drive directly, except when it needs to write something to it (or read back something it previously wrote to the ram layer).

As opposed to running from a multisession dvd where apparently it reads everything into ram and doesn't need to read anything from the dvd again until it's time to save another session.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#13 Post by rcrsn51 »

dabruro wrote:For flash media, doesn't it use that temporary ram layer only for *writes*?
You're right. :oops:

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#14 Post by Flash »

dabruro wrote:...Also I think adding a session to a dvd carries some risk that if it fails, the entire disc, with all of my previous saved work, could become unreadable.
If your hard disk drive fails you lose everything that's on it. I know because I've had hard disk drives fail several times. That's why I run Puppy from a multisession DVD. :)
As I said before, I've been running Puppy from multisession DVDs every day for about 7 years. I can't remember a save failing in such a way that it made the DVD unreadable. If it did, it was during the early days of multisession. Even if such a thing happened, the dd command would probably be able to recover everything from the disk except that last session. Short of physical damage to the DVD, or a failure in the drive which caused the recording laser to burn areas of the disk that have already been recorded to, I think that everything I've saved to the disk is at least as safe (as in recoverable) as it would be if I ran Puppy any other way.
I might mention that the data layer of a DVD is sandwiched in the middle of the disk, well protected by a thick layer of polycarbonate plastic on both sides. The data layer of a CD is on its top side, protected only by a thin coat of basically paint.

To keep booting time to a minimum, I only save stuff to the DVD that has to do with Puppy itself, and that I will use all the time. Other stuff I either save in a USB flash drive, or use Pburn to save to the multisession DVD so that it is not loaded when Puppy boots.

We'll be happy to debate the merits of the different ways of running Puppy with you, but if you're really interested in finding out which one is best for you, I suggest that the best way to find out is to burn Puppy on a multisession DVD and experiment with it. :)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#15 Post by bigpup »

The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Les Kerf
Posts: 317
Joined: Sun 24 Jun 2012, 13:30

#16 Post by Les Kerf »

I have also been running Puppy on multi-session DVD-RW for several months, largely due to Flash's influence. I have been keeping two copies of each Puppy, marked "A" and "B", and alternate them back and forth about once every week or two, re-burning to keep the saved sessions down to a minimum. Important stuff is saved elsewhere, and lately I haven't been saving very many sessions.

I like the fact that Puppy runs entirely in ram when booted this way, and nothing is likely to corrupt my system.
Les

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#17 Post by greengeek »

Flash wrote:I might mention that the data layer of a DVD is sandwiched in the middle of the disk, well protected by a thick layer of polycarbonate plastic on both sides. The data layer of a CD is on its top side, protected only by a thin coat of basically paint.
Interesting comparison. thanks for the info. Never realised there was a difference. Now I feel insecure about my CDs :-(

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#18 Post by Flash »

That's why you're not supposed to write on a CD with a ball point pen. It's ok on a DVD though.

dabruro
Posts: 8
Joined: Mon 08 Dec 2008, 19:03

#19 Post by dabruro »

Thanks, bigpup. I'd already read that page but it didn't seem to answer my questions.

I guess this is now a feature request -- I would like a way to load everything into RAM (when there's plenty) including the save file (and maybe any additional sfs files too), even when the save file and the sfs files are on a hard drive.

Last night I did my first remaster, onto a cd (i wanted dvd but only had dvd+r which it said it couldn't burn directly as opposed to dvd-r).

I copied *everything* from under /root into the main sfs, with my personal files, simply because i wanted it all to preload into ram. i didn't want to make something to distribute.

It worked well. After i copied the main sfs to my hard drive, it appears that it still loads all 350MB of it into RAM at boot, which is what i wanted. It's *fast* -- LibreOffice, now entirely in the main sfs in ram, loads in a couple of seconds. The *slowest* thing is several seconds to load firefox because my profile is on the hard drive outside the sfs.

It loads LibreOffice even faster than my Windows 7 machine, even though the Windows machine has much faster hardware. Puppy is on an hp pavillion desktop from about 2005 with a 2-core athlon and 2GB RAM. Windows 7 is 64-bit edition on a nice 2010 or 2011 model year thinkpad w520 with 4 cores & 8GB RAM.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#20 Post by rcrsn51 »

@dabruro: Congratulations! Remastering can be a challenge for some users.

@Flash: How do sfs files work in multisession? Must you extract them into your filesystem or can they be mounted from the DVD on-the-fly?

Post Reply