I'm using Puppy 1.0.5 on a 256MB USB flash drive on an IBM T42p with Intel ipw2200 wireless. Works perfectly.
But, it takes ages to boot and the reason is the time it takes to copy all the content of the flash drive to RAM disk; without that copy it would boot in less than a minute I'm sure.
My suggestion is that an option be provided to mount pupxxx read only and use the ram as a cache.
Part of my reasoning is that flash drives are getting larger all the time and it is reasonable to expect that the USB drive will be larger than the main memory of the PC which means that you can't copy it all to RAM. I'm thinking of data rather than applications, I'd like to use the flash drive and Puppy as a jukebox but if I have a giga byte drive full of music it can't copy it to RAM even if I were willing to wait.
If the RAM could be used as a cache it could be set up to have the same behaviour as it does now so that changes could be written back. Because changes would be generally only a small fraction of the total the writes would be faster than writing the whole pupxxx file.
Load stuff into RAM on first use instead of at boot
- kwhitefoot
- Posts: 18
- Joined: Thu 27 Oct 2005, 12:37
- Location: Norway
Good news,
Your reasoning that a large Flash RAM may make it imposible to load everything into RAM is only accurate under the following circumnstances:
- You create a very large pup001 file
and
- You don't have enough swap memory.
As you can see it would only happen under circumnstances that don't make sense. I mean, if you hit your foot with a hammer it will hurt, but ... why would you do that?
Actually puppy does not have to change a bit for you to have the functionality you want.
First let me explain the reasoning of the current behaviour:
Flash memory has a finite life, this is, you can only write to it so many times before it fails.
By default, Puppy tries to avoid writting to the flash until you shut down. This will extend the life of the flash memory.
If knowing this you still want to continuosly write to the flash RAM you can, Nothing in puppy will prevent it.
You can keep the small pup001 file just for applications and save all your data to the partition outside the pup file.
If you are planning to use puppy as a jukebox, writing the sound files outside the pup001 file makes sense as you are not going to be modifying those files constantly.
Your reasoning that a large Flash RAM may make it imposible to load everything into RAM is only accurate under the following circumnstances:
- You create a very large pup001 file
and
- You don't have enough swap memory.
As you can see it would only happen under circumnstances that don't make sense. I mean, if you hit your foot with a hammer it will hurt, but ... why would you do that?
Actually puppy does not have to change a bit for you to have the functionality you want.
First let me explain the reasoning of the current behaviour:
Flash memory has a finite life, this is, you can only write to it so many times before it fails.
By default, Puppy tries to avoid writting to the flash until you shut down. This will extend the life of the flash memory.
If knowing this you still want to continuosly write to the flash RAM you can, Nothing in puppy will prevent it.
You can keep the small pup001 file just for applications and save all your data to the partition outside the pup file.
If you are planning to use puppy as a jukebox, writing the sound files outside the pup001 file makes sense as you are not going to be modifying those files constantly.
I think kwhitefoot makes a good point, but implimenting it could be tricky...
The idea is that copying all of USB disk to memory can take a while say if you only have USB 1.1 ... and if all you want to do is play bubbles, then you've got to wait ages for the seemingly unnecessarially long boot sequence to complete.
However if you used a technology like shared memorys copy on write clever tricks, then the USB stick is not read until it is about to be changed, or in this case read. However you only want to save those changes on shutdown, so you cache the changes, and what has already been read, somewhere in memory.
And while your computer booted it could slowly read piece by piece the USB drives information in the background until all is recieved.
But I do not know what clever tricks could be used to make this happen, if there are any already existing...
maybe some virtual block device that copies blocks from a source and caches writes, from say a loopback file being the pup file, all of which is mounted on /root ... does anyone know of such a thing?
The idea is that copying all of USB disk to memory can take a while say if you only have USB 1.1 ... and if all you want to do is play bubbles, then you've got to wait ages for the seemingly unnecessarially long boot sequence to complete.
However if you used a technology like shared memorys copy on write clever tricks, then the USB stick is not read until it is about to be changed, or in this case read. However you only want to save those changes on shutdown, so you cache the changes, and what has already been read, somewhere in memory.
And while your computer booted it could slowly read piece by piece the USB drives information in the background until all is recieved.
But I do not know what clever tricks could be used to make this happen, if there are any already existing...
maybe some virtual block device that copies blocks from a source and caches writes, from say a loopback file being the pup file, all of which is mounted on /root ... does anyone know of such a thing?