Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 22 Aug 2014, 13:54
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Pupsave on USB when using separate data partition
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [22 Posts]   Goto page: Previous 1, 2
Author Message
rcrsn51


Joined: 05 Sep 2006
Posts: 9040
Location: Stratford, Ontario

PostPosted: Tue 14 Aug 2012, 16:33    Post subject:  

So how do you know when writing is fully completed on these SD cards?
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2477
Location: New Zealand

PostPosted: Tue 14 Aug 2012, 17:32    Post subject:  

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.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9040
Location: Stratford, Ontario

PostPosted: Tue 14 Aug 2012, 18:28    Post subject:  

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.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2477
Location: New Zealand

PostPosted: Tue 14 Aug 2012, 18:53    Post subject:  

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.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3964
Location: Kiel,Germany

PostPosted: Tue 14 Aug 2012, 21:51    Post subject:  

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:
#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 :
xosview-disk-read-writes.png
 Description   
 Filesize   835.52 KB
 Viewed   205 Time(s)

xosview-disk-read-writes.png

Back to top
View user's profile Send private message Visit poster's website 
ETP


Joined: 19 Oct 2010
Posts: 532
Location: UK

PostPosted: Wed 15 Aug 2012, 02:10    Post subject: Pupsave on USB  

greengeek wrote:
Quote:
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:
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
Accessibility Pups: -- Magoo -- The Pup With No Name -- MouseCam -- Obedient
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2477
Location: New Zealand

PostPosted: Wed 15 Aug 2012, 03:52    Post subject: Re: Pupsave on USB  

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.

Quote:

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!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [22 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0651s ][ Queries: 12 (0.0036s) ][ GZIP on ]