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

Post here if you are a new Porteus member and you're looking for some help.
Quen
White ninja
White ninja
Posts: 5
Joined: 24 Jan 2017, 05:10
Distribution: Porteus XFCE 32-bit
Location: Bulgaria

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

Post#1 by Quen » 28 Jan 2017, 16:19

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:
Last edited by Quen on 29 Jan 2017, 09:52, edited 1 time in total.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Does the USB flash R/W matter?

Post#2 by Bogomips » 28 Jan 2017, 20:00

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.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Quen
White ninja
White ninja
Posts: 5
Joined: 24 Jan 2017, 05:10
Distribution: Porteus XFCE 32-bit
Location: Bulgaria

Re: Does the USB flash R/W matter?

Post#3 by Quen » 28 Jan 2017, 21:10

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:

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: Does the USB flash R/W matter?

Post#4 by fulalas » 28 Jan 2017, 22:36

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:

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Does the USB flash R/W matter?

Post#5 by Ed_P » 29 Jan 2017, 01:01

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.
Ed

donald
Full of knowledge
Full of knowledge
Posts: 2065
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: Does the USB flash R/W matter?

Post#6 by donald » 29 Jan 2017, 03:35

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.

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: Does the USB flash R/W matter?

Post#7 by fulalas » 29 Jan 2017, 08:34

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:

Quen
White ninja
White ninja
Posts: 5
Joined: 24 Jan 2017, 05:10
Distribution: Porteus XFCE 32-bit
Location: Bulgaria

Re: Does the USB flash R/W matter?

Post#8 by Quen » 29 Jan 2017, 09:52

Now I understand, thanks for the help. :beer:

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Does the USB flash R/W matter?

Post#9 by Bogomips » 29 Jan 2017, 17:06

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
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Post Reply