Pupsave on USB when using separate data partition

Using applications, configuring, problems
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

So how do you know when writing is fully completed on these SD cards?

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

#17 Post by greengeek »

To be honest I don't know for sure when it is finished, I just try to gauge it from the cpu graph and from whether or not the system will respond to a shutdown message (if I am at that stage..). When I find a flash card that seems to take longer than others I give it a test with something like a 100-200mb iso file copy and see at what point it will allow an unmount action. Not very scientific I'm afraid. So much easier if there is an LED.

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

#18 Post by rcrsn51 »

Are you doing this with a "sync"? It's been my experience that when the sync is done, the partition is immediately ready to unmount and shut down.

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

#19 Post by greengeek »

No, I haven't been using sync. If I have been wanting to eject a usb stick / flash card I normally use Pmount (or whatever icon method might be available) to unmount the stick, or else just wait for the shutdown to complete if the relevant partition is on my boot stick.

My main concern was not really having any true indication (other than interpreting LED activity) that data had actually finished being written at the time I was expecting. From the responses I have received here, it sounds as if data that I'm saving to my data partition IS in fact starting to be written there as soon as I use the save dialog within Abiword etc, but I still don't have any way of knowing when the save terminates. (and this effect is much more pronounced if it is a large file like an iso that is being copied across with the file manager - I assume that this type of copy begins as soon as I ask it to, but I have little confidence that it finishes as quickly as the dialog suggests).

I think I will do a bit of 'sync' experimenting with some of my slower flash cards and see what I can find out regarding transfer of large amounts of data.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#20 Post by Karl Godt »

I just greped sync in /usr/sbin/pmount and found one match. Also /usr/local/bin/drive_all has one match. Probably it could be implemented in /bin/umount again:

Code: Select all

#sync #paranoid precaution. v2.12 kernel call to modprobe, sync hangs.
because if the partition is unmounted by using rox and not by clicking the drive icon on desktop the bare /bin/umount script gets run and not the copied /usr/local/bin/drive_all as /root/.pup_event/DRIVE/AppRun which would sync .

FWIW : I use xosview to check if writes are done :

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Pupsave on USB

#21 Post by ETP »

greengeek wrote:
There seems to be a huge variation in write speed between brands/models. Without an LED it's guesswork. Might have to stay away from micro-SDs.


Here are some rough & ready stats on read speeeds. As a rule of thumb write speeds are generally
less than half the read speed.
Whilst these do not effect USB/SD live running they impact boot up speed and save time.

sh-4.1# hdparm -t /dev/sdb1 (USB2 STICK - FAT32 PARTITION)
/dev/sdb1:
Timing buffered disk reads: 26 MB in 3.78 seconds = 7036 kB/s
sh-4.1# hdparm -t /dev/sdb2
-------------------------------------------------------------------
/dev/sdb2: (SAME USB2 STICK - EXT4 PARTITION)
Timing buffered disk reads: 63 MB in 3.04 seconds = 21194 kB/s
sh-4.1# hdparm -t /dev/sda1
-------------------------------------------------------------------
/dev/sda1: (NTFS HDD - WD 7200rpm SATA-2)
Timing buffered disk reads: 146 MB in 3.00 seconds = 49717 kB/s
sh-4.1#
-------------------------------------------------------------------
sh-4.1# hdparm -t /dev/sde1 (16MEG FAT32 SmartmediaCard)
/dev/sde1:
Timing buffered disk reads: 13 MB in 3.01 seconds = 4412 kB/s
sh-4.1#
-------------------------------------------------------------------

Given the (not surprising) speed advantage and robustness of EXT4 it actually makes sense to
place both the main sfs & the save file on that 2nd partition but keep initrd and
vmlinuz on the fat32 boot partition. I have been running such a config on one of
my sticks for some time. The boot codes were tricky to get right but are as follows:

Code: Select all

LABEL 5332
MENU LABEL Slacko 5.3.3.2    05/07/12
KERNEL /p5332/vmlinuz
APPEND initrd=/p5332/initrd.gz pmedia=usbflash pupsfs=sdb2:/p5332/puppy_slacko_5.3.3.2.sfs psavemark=2
That and the figures for the HDD lead onto my placing the main sfs & save file on the hard drive
but booting from SmartMedia......but thats another story!
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

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

Re: Pupsave on USB

#22 Post by greengeek »

ETP wrote:Whilst these do not effect USB/SD live running they impact boot up speed and save time.
I find that if I allow the savefile to be updated during running (which is the usual default) a slow usb stick / SD card really does impact on the time that the system "locks up". Thats why I generally turn off the savefile update and only allow it at shutdown time. I also think that a really slow stick lengthens the save process significantly, and therefore increases the risk of data loss if the power fails, or if I get a bit careless and pull the stick before saving is finished.
Timing buffered disk reads: 26 MB in 3.78 seconds = 7036 kB/s
-------------------------------------------------------------------
Timing buffered disk reads: 146 MB in 3.00 seconds = 49717 kB/s
-------------------------------------------------------------------
Timing buffered disk reads: 13 MB in 3.01 seconds = 4412 kB/s
-------------------------------------------------------------------
Interesting variation in speeds. Several of my sticks are lucky to get beyond 1 or 2 MB/s even on a usb2 port. Pretty lousy - and very noticeable at write time.

I'm stunned at the differential you've posted for the EXT4. Amazing!

Post Reply