Page 1 of 1

[Solved] Does the USB flash R/W matter?

Posted: 28 Jan 2017, 16:19
by Quen
Hello, I'm going to buy an USB flash specially for Porteus, and I'm wondering if there is something else I should be looking for aside from the capacity of the flash? Does the read and write speeds of the flash affects the performance in any way (I usually use the copy2ram cheat-code)? :unknown:

Re: Does the USB flash R/W matter?

Posted: 28 Jan 2017, 20:00
by Bogomips
Quen wrote:Does the read and write speeds of the flash affects the performance in any way (I usually use the copy2ram cheat-code)?
If by this you mean you are going to pull out the stick when Porteus says it is safe to do so, then it should not matter at all. However different if you intend to save files to the stick.

Re: Does the USB flash R/W matter?

Posted: 28 Jan 2017, 21:10
by Quen
Bogomips wrote:
Quen wrote:Does the read and write speeds of the flash affects the performance in any way (I usually use the copy2ram cheat-code)?
If by this you mean you are going to pull out the stick when Porteus says it is safe to do so, then it should not matter at all. However different if you intend to save files to the stick.
Well, it's going to be a FAT32 flash and I'm going to put my porteussave.dat on it.. I wonder if I'm going to get any performance improvements or something if I take a flash with 200Mb/s transfer speed instead of a cheaper one with 30Mb/s? :fool:

Re: Does the USB flash R/W matter?

Posted: 28 Jan 2017, 22:36
by fulalas
Quen wrote:Well, it's going to be a FAT32 flash and I'm going to put my porteussave.dat on it.. I wonder if I'm going to get any performance improvements or something if I take a flash with 200Mb/s transfer speed instead of a cheaper one with 30Mb/s? :fool:
You'll have some performance improvement, of course. But in my experience using porteussave.dat is never as fast as using everything inside RAM and then saving just what you really want. I use /mnt/*usbstick*/porteus/rootcopy/etc/rc.d/rc.local_shutdown script to save what I want at the shutdown process. So, for example, I like to restore my Opera's tabs and history every time I reboot, so I put these 2 lines on the script:

Code: Select all

cp -u /home/guest/.config/opera/"Current Session" /mnt/sdb1/porteus/rootcopy/home/guest/.config/opera/"Current Session"
cp -u /home/guest/.config/opera/History /mnt/sdb1/porteus/rootcopy/home/guest/.config/opera/History
Also, I like to restore Qmmp (audio player) playlist, so:

Code: Select all

cp -u /home/guest/.qmmp/playlist.txt /mnt/sdb1/porteus/rootcopy/home/guest/.qmmp/playlist.txt
With that in mind I can't even see much reason in having a SSD or a fast USB stick, once RAM is infinitely faster than anything else you can imagine. Regarding the OS, the only moment a fast unit can make a difference is during the boot process. But, hey, instead of waiting 10 sec, you'll wait 40 sec and with that you can save a lot of money :good:

Re: Does the USB flash R/W matter?

Posted: 29 Jan 2017, 01:01
by Ed_P
Quen wrote:Well, it's going to be a FAT32 flash and I'm going to put my porteussave.dat on it.. I wonder if I'm going to get any performance improvements or something if I take a flash with 200Mb/s transfer speed instead of a cheaper one with 30Mb/s?
If you use the changes=EXIT: cheatcode with your save.dat file the only time it is written to is when Porteus is shutdown. So how much is shutting down in 10 seconds verses 40 seconds worth to you? Obviously the times are based on the size of your save.dat file. Mine vary between 320MB and 512MB, large files, like downloads, I move to the flash drive.
fulalas wrote:I use /mnt/*usbstick*/porteus/rootcopy/etc/rc.d/rc.local_shutdown script to save what I want at the shutdown process. So, for example, I like to restore my Opera's tabs and history every time I reboot, so I put these 2 lines on the script:

Code: Select all

cp -u /home/guest/.config/opera/"Current Session" /mnt/sdb1/porteus/rootcopy/home/guest/.config/opera/"Current Session"
cp -u /home/guest/.config/opera/History /mnt/sdb1/porteus/rootcopy/home/guest/.config/opera/History
An interesting approach fulalas. :good: What creates the /rootcopy/etc folders and files? Just using rootcopy? My flash drive's /porteus/rootcopy/ folder is empty.

It should be noted that the non-rootcopy's rc.local_shutdown file needs to be made executable for it to run. At least mine did in 3.2.2 Cinnamon 64-bit. And in doing so it checks the space usage of a save.dat file when shutting down.

Re: Does the USB flash R/W matter?

Posted: 29 Jan 2017, 03:35
by donald
I usually use the copy2ram cheat-code
about copy2ram

as the porteus FAQ states:
Porteus exists in a compressed state on your storage media, with no /root, /bin, /usr, etc. directory structure
on the media itself. The familiar Linux file structure is created on the fly in your computer's RAM during the boot process,

So almost all parts of porteus are running in ram already.
Imo (personal experience)
There is no significant increase of "speed" with copy2ram
If one does not want to pull/plug out the boot device copy2ram is superfluous.

Re: Does the USB flash R/W matter?

Posted: 29 Jan 2017, 08:34
by fulalas
Ed_P wrote:An interesting approach fulalas.
I thought this was the most common way of using Porteus :D
Ed_P wrote:What creates the /rootcopy/etc folders and files? Just using rootcopy? My flash drive's /porteus/rootcopy/ folder is empty.
You need to copy (manually or through a script) everything you want to keep/save from system folders to /mnt/usbstick/porteus/rootcopy folder, then during the boot Porteus will copy everything back to the corresponding folders. For example: I changed some settings of SMPlayer (video player), but I want to keep these settings let's say forever (no need to be always changing them), so I manually copied /home/guest/.config/smplayer/smplayer.ini to mnt/usbstick/porteus/rootcopy/home/guest/.config/smplayer/ . Every time Porteus boots, it makes a copy of this file back to /home/guest/.config/smplayer . But, as I said before, somethings are constantly changing and I want to save them every reboot/shutdown, so I use rc.local_shutdown script.
Ed_P wrote:It should be noted that the non-rootcopy's rc.local_shutdown file needs to be made executable for it to run. At least mine did in 3.2.2 Cinnamon 64-bit. And in doing so it checks the space usage of a save.dat file when shutting down.
I didn't have to do anything, just changed rc.local_shutdown script and put it inside /mnt/usbstick/porteus/rootcopy/etc/rc.d/
donald wrote:There is no significant increase of "speed" with copy2ram
If one does not want to pull/plug out the boot device copy2ram is superfluous.
AFAIK, copy2ram has two advantages:

1- you can unplug your USB stick after boot
2- all modules inside base and modules folders you try to execute are already loaded in RAM, so they open instantly

So, regarding performance, you're right: copy2ram only moves loading time from modules execution (under demand) to boot. :good:

Re: Does the USB flash R/W matter?

Posted: 29 Jan 2017, 09:52
by Quen
Now I understand, thanks for the help. :beer:

Re: Does the USB flash R/W matter?

Posted: 29 Jan 2017, 17:06
by Bogomips
fulalas wrote:So, regarding performance, you're right: copy2ram only moves loading time from modules execution (under demand) to boot. :good:
If talking performance meaning CPU load, then it seems copy2ram wins out every time on low hardware specs. http://forum.porteus.org/viewtopic.php? ... 344#p50056