Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Bob Harris <harris@zk3.dec.com>
Subject: Re: ADVFS and fragmentation.
Date: Sat, 02 Aug 2003 02:43:24 GMT	[thread overview]
Message-ID: <harris-0A0ABF.22435701082003@juggl7.zk3.dec.com> (raw)
In-Reply-To: pan.2003.08.01.17.53.28.327019@aero-graphics.com

In article <pan.2003.08.01.17.53.28.327019@aero-graphics.com>,
 "bofh00" <jnielsen@aero-graphics.com> wrote:

> One oddity I have noticed relates to raster files. We regularly
> deal with large imagery 100mb-1gb. These files no matter how
> fragmented the system becomes tend to remain fairly contiguous and
> according to "showfile -x" retain their Advfs I/O effeciency and
> keep a lower number of extents. This does not apply to most data
> generated from these images.
> 
> We also generate pyramid data sets of the images which basically
> are the same image but resampled to multiple resolutions
> all contained within one file. Each "level" if you will is used
> for zooming into the image. These pyramid files themselves always
> have extrememly poor Perf and Extents listings according to
> "showfile -x".
> 
> The raster files are scanned on a remote station that dumps them
> to the raid via NFS.  The pyramid layers are generated locally.
> I do no understand why the images sent via nfs seem to be highly
> resistant to fragmentation(?) and yet those pyramid files are not.
> 
> 24_005 if a TIFF file. The _128 is a pyramid file of this same
> image. The 24_005 TIFF was scanned to the raid and the _128 pyramid
> was generated literally right after within the same 60 seconds.
> -rw-rw-r--   1 foobar  users    363918990 Jul  7 13:09 24_005.tif
> -rw-rw-r--   1 foobar  users        65766 Jul  7 13:09 24_005.tif_128
> [root@zeus]$ showfile -x 24_005.tif
>          Id  Vol  PgSz  Pages  XtntType  Segs  SegSz  I/O   Perf  File
>    4de.8002    1    16  44424    simple    **     **  async  99%  24_005.tif
> [root@zeus]$ showfile -x 24_005.tif_128
>          Id  Vol  PgSz  Pages  XtntType  Segs  SegSz  I/O   Perf  File
>    4ef.8001    1    16      8    simple    **     **  async  25%  
>    24_005.tif_128
> 
> One thing to note in this case is how small the pyramid is. This
> has little to no affect though. Some pyramids are 100MB with an
> associated 500MB image and end up with a Perf rating of 13-20%
> when created in the same manner. Also note that this can happen
> with the system 80% empty and right after a full defrag/balance.
> 
> -Tru64 4.0f patch kit 7.
> -ADVFS Domain version 3.
> -Files are for the most part in two ranges.
>   -1k to ~5meg (Comprises the majority of files)
>      -Majority are less than 50k.
>   -50mb to 1gb (Comprises the majority of space)
>      -Majority are 150-300mb.
> 
> Typical File Stats:
> Size         #Files  %Space
> ============|=======|==============
> <=50K       |14208  |<1%      
> >50k<=512K  |3043   |<1%
> >512K<=5M   |599    |~1%
> >5M<=100M   |864    |~22%
> >100M<=300M |780    |~45%
> >300M       |789    |~30%
> Total Space Used: ~590Gigabytes ~80% of total capacity.
> 
> This is within 20 hours of a full defragmentation:
> defragment: Gathering data for domain 'raid2'
>   Current domain data:
>     Extents:                2075761
>     Files w/extents:           9557
>     Avg exts per file w/exts: 217.20
>     Aggregate I/O perf:         73%
>     Free space fragments:     58852
>                      <100K     <1M    <10M    >10M
>       Free space:      1%      4%      6%     89%
>       Fragments:    31435   23558    3050     809
> 
> [root@zeus]$ showfdmn raid2
>                Id              Date Created  LogPgs  Domain Name
> 3d31c4ff.000e62be  Sun Jul 14 12:37:51 2002     512  raid2
> 
>   Vol   512-Blks        Free  % Used  Cmode  Rblks  Wblks  Vol Name 
>    1L  355486275    44359440     88%     on    256    256  /dev/rz25c
>    2   355486275    67657936     81%     on    256    256  /dev/rz26c
>    3   355486275    45449568     87%     on    256    256  /dev/rz27c
>    4   355486275    85871568     76%     on    256    256  /dev/rz28c
>       ----------  ----------  ------
>       1421945100   243338512     83%
> 
> 

The characteristics of the pyramid file seems to suggest to me that you 
build several pyramid files in parallel using several processes all 
writing their separate pyramid file to the disk at the same time.  This 
would result in the first writer getting a chunk of disk space, then 2nd 
writer getting the next chunk, the 3rd writer getting the next, etc...  
When the first writer goes to write its next chunk, it gets its next 
chunk separated from the its first chunk by all the chunks eaten by the 
other pyramid writers.  Thus you have a built in fragmenting systems.

The original TIFF file is more contiguous because you most likely only 
have the file transfer in progress and nothing else writing to the disk 
until after it is fully transferred.

But the big question is.  Do you notice a file access performance 
problem when you try to access your pyramid files?

Assuming I right about how you create pyramid files, then you have some 
obvious options.  

1) create one pyramid file at a time.

2) create pyramid files on a different disk, and then copy them to the 
800GB domain one at a time (maybe us symlinks to always point to the 
current completed pyramid files if you need to access them right away).

3) try using the migrate command as poor mans defragment.  It is not 
intended as a defragmentation tool, but the side effect of using migrate 
is that if there is sufficient unfragmented free space, it will tend to 
defragment the file to some limited extend just by the act of moving it.  
migrate can even be used to move the file on the same volume (multiple 
volumes are not required for migrate).  Again, migrate is not trying to 
defragment, it just sometimes happens to reduce fragmentation in a file 
as a side effect of moving the file.

4) use multiple domains, one per process creating pyramid files, so that 
each process is the only one writing to the domain.  Then use symlinks 
to point to the pyramid files so you can keep your current access 
approach.

5) This is a weak idea, but I'll pass it along anyway. Split your 
volumes up into more smaller volumes and have more volumes in the 
domain.  AdvFS creates a file on the volume with the most amount of free 
space.  If when the pyramid writers start writing the volumes in the 
domain are fairly well balanced (or at least several volumes with the 
most free space are well balanced), then hopefully the first pyramid 
file would get created on volume A, the 2nd pyramid would go to volume 
B, etc...  A file will always allocate storage from the same volume as 
long as that volume has free space to give it.  It will only get storage 
from a different volume if volume it is on has run out of space.  You 
could even start by creating empty pyramid files before the pyramid runs 
start and using the migrate utility to move each of them on their own 
volume so that they are allocating from essentially their own provate 
pool.  This assumes your pyramid applications will accept the empty file 
as its starting point and not delete it an start all over with a new 
file.  Again, then depends on having enough volumes so that each 
parallel pyramid writer can be writing to its own volume.  Later you can 
allow defragment and balance to move them any where you want.  You are 
just using this trick to get initially reasonably contiguous files.

6) upgrade to v5.1b and try vfast instead of defragment.  vfast is 
rather new and does not try to actually defragment everything.  Rather 
it trys to defragment just the hot files.  I have very little experience 
with vfast, so I'm not trying to push it, just making you aware that it 
exists.

7) other ideas that I have not thought of.

Then again, I could be totally wrong about how the pyramid files are 
created and thus my ideas are not worth the electrons they are written 
on :-)

Good luck.

                                        Bob Harris


  reply	other threads:[~2003-08-02  2:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 15:26 ADVFS and fragmentation bofh00
2003-08-01 17:53 ` bofh00
2003-08-02  2:43   ` Bob Harris [this message]
2003-08-03 13:26     ` Bob Harris
2003-08-04 14:24       ` bofh00
2003-08-02  1:23 ` Jack Patteeuw
2003-08-04 14:19   ` bofh00
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox