Re: [zfs-discuss] 'du' is not accurate on zfs

2008-02-20 Thread A Darren Dunham
On Tue, Feb 19, 2008 at 12:13:25PM -0800, Marion Hakanson wrote:
 [EMAIL PROTECTED] said:
  It may not be relevant, but I've seen ZFS add weird delays to things too.  I
  deleted a file to free up space, but when I checked no more space was
  reported.  A second or two later the space appeared. 
 
 Run the sync command before you do the du.  That flushes the ARC and/or
 ZIL out to disk, after which you'll get accurate results.  I do the same when
 timing how long it takes to create a file -- time the file creation plus the
 sync to see how long it takes to get the data to nonvolatile storage.

When logging was first added to UFS, it had the same issue.  But I
believe statvfs was modified to take future removes (logged) into
account.  Can ZFS do the same?  

-- 
Darren Dunham   [EMAIL PROTECTED]
Senior Technical Consultant TAOShttp://www.taos.com/
Got some Dr Pepper?   San Francisco, CA bay area
  This line left intentionally blank to confuse you. 
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] 'du' is not accurate on zfs

2008-02-19 Thread Marion Hakanson
[EMAIL PROTECTED] said:
 It may not be relevant, but I've seen ZFS add weird delays to things too.  I
 deleted a file to free up space, but when I checked no more space was
 reported.  A second or two later the space appeared. 

Run the sync command before you do the du.  That flushes the ARC and/or
ZIL out to disk, after which you'll get accurate results.  I do the same when
timing how long it takes to create a file -- time the file creation plus the
sync to see how long it takes to get the data to nonvolatile storage.

Regards,

Marion


___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] 'du' is not accurate on zfs

2008-02-18 Thread Richard L. Hamilton
 On Sat, 16 Feb 2008, Richard Elling wrote:
 
  ls -l shows the length.  ls -s shows the size,
 which may be
  different than the length.  You probably want size
 rather than du.
 
 That is true.  Unfortunately 'ls -s' displays in
 units of disk blocks 
 and does not also consider the 'h' option in order to
 provide a value 
 suitable for humans.
 
 Bob

ISTR someone already proposing to make ls -h -s   work in
a way one might hope for.
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] 'du' is not accurate on zfs

2008-02-16 Thread Ross
It may not be relevant, but I've seen ZFS add weird delays to things too.  I 
deleted a file to free up space, but when I checked no more space was reported. 
 A second or two later the space appeared.

And I'm also seeing zpool status report that drives are ok when one is 
disconnected.  I have to run it a second time to correctly show that one is now 
unavailable.

They may not be related, but the end result is pretty similar - there's a 
noticable delay before ZFS gives you the correct, up to date information.
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] 'du' is not accurate on zfs

2008-02-16 Thread Richard Elling
Bob Friesenhahn wrote:
 I have a script which generates a file and then immediately uses 'du 
 -h' to obtain its size.  With Solaris 10 I notice that this often 
 returns an incorrect value of '0' as if ZFS is lazy about reporting 
 actual disk use.  Meanwhile, 'ls -l' does report the correct size.
   

ls -l shows the length.  ls -s shows the size, which may be
different than the length.  You probably want size rather than du.
 -- richard

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] 'du' is not accurate on zfs

2008-02-16 Thread Bob Friesenhahn
On Sat, 16 Feb 2008, Richard Elling wrote:

 ls -l shows the length.  ls -s shows the size, which may be
 different than the length.  You probably want size rather than du.

That is true.  Unfortunately 'ls -s' displays in units of disk blocks 
and does not also consider the 'h' option in order to provide a value 
suitable for humans.

Bob
==
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] 'du' is not accurate on zfs

2008-02-16 Thread David Magda
On Feb 16, 2008, at 06:43, Ross wrote:

 It may not be relevant, but I've seen ZFS add weird delays to  
 things too.  I deleted a file to free up space, but when I checked  
 no more space was reported.  A second or two later the space appeared.

This also happens on FreeBSD's UFS if you have SoftUpdates enabled. I  
forget exactly how it works (see McKusick's paper), but basically  
there is a slight delay in updating the meta-data on disk, which  
gives the system some time to coalesce several operations in memory  
before doing any disk I/O.

It makes it very easy to do an 'rm -rf' on several hundred megabytes,  
which returns to the command line almost immediately; it's several  
seconds before you hear any disk thrashing.
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] 'du' is not accurate on zfs

2008-02-15 Thread Bob Friesenhahn
I have a script which generates a file and then immediately uses 'du 
-h' to obtain its size.  With Solaris 10 I notice that this often 
returns an incorrect value of '0' as if ZFS is lazy about reporting 
actual disk use.  Meanwhile, 'ls -l' does report the correct size.

Bob
==
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss