* ADVFS and fragmentation.
@ 2003-07-31 15:26 bofh00
2003-08-01 17:53 ` bofh00
2003-08-02 1:23 ` Jack Patteeuw
0 siblings, 2 replies; 7+ messages in thread
From: bofh00 @ 2003-07-31 15:26 UTC (permalink / raw)
We have an RA8000 with 24 drives split into 4 arrays horizontally.
Total capacity is around 800GB. Each array is configured as raid5
and then I created an ADVFS domain composed of each of those arrays
(4 devices if you will).
The system is pretty much flawless with regard to this accept for
one aspect. We move a LOT of data on, off and around this raid. Lot
meaning approximately a minimum of 100GB a day. Some days it might be
40 other days it might be 200. The problem is fragmentation.
From what I have gathered on stats usually we do not see a major
impact on performace until around 40% as reported by defragment -nv.
Unfortunately I can defrag this system over the weekend and by time
8am Monday rolls around its already down to about 70%. I also balance
the advfs domain. By Tuesday morning its nothing to see the
aggregate IO down to like 30-35%. This is having a severe issue with
performance.
Does anyone have a suggestion to get around this? We have put
together a lower end raid for simple storage and it has alleviated
the primary issue but it has anything but solved it.
Is there perhaps something I can do to help prevent this
fragmentation via tweaking or is this just a fact of dealing with
advfs and the movement of this amount of data?
TIA.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ADVFS and fragmentation.
2003-07-31 15:26 ADVFS and fragmentation bofh00
@ 2003-08-01 17:53 ` bofh00
2003-08-02 2:43 ` Bob Harris
2003-08-02 1:23 ` Jack Patteeuw
1 sibling, 1 reply; 7+ messages in thread
From: bofh00 @ 2003-08-01 17:53 UTC (permalink / raw)
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%
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ADVFS and fragmentation.
2003-07-31 15:26 ADVFS and fragmentation bofh00
2003-08-01 17:53 ` bofh00
@ 2003-08-02 1:23 ` Jack Patteeuw
2003-08-04 14:19 ` bofh00
1 sibling, 1 reply; 7+ messages in thread
From: Jack Patteeuw @ 2003-08-02 1:23 UTC (permalink / raw)
So you have **ONE** AdvFS domain that is 800 GB ?!!
How do you back that up, or don't you ? In the event of a failure of
the RA8000, do you know how many **DAYS** it would to restore this
amount of data ? Putting all of your eggs in one basket (domain) is
asking for a disaster. (We recently has a RAID failure (different
hardware and OS) and it took 3 days to rebuild ! SH*T happens !!)
My first suggestion is to split the data into 4 domains. With enough
CPU's you should be able to defrag those 4 over a weekend.
jp
bofh00 wrote:
> We have an RA8000 with 24 drives split into 4 arrays horizontally.
> Total capacity is around 800GB. Each array is configured as raid5
> and then I created an ADVFS domain composed of each of those arrays
> (4 devices if you will).
>
> The system is pretty much flawless with regard to this accept for
> one aspect. We move a LOT of data on, off and around this raid. Lot
> meaning approximately a minimum of 100GB a day. Some days it might be
> 40 other days it might be 200. The problem is fragmentation.
>
> From what I have gathered on stats usually we do not see a major
> impact on performace until around 40% as reported by defragment -nv.
> Unfortunately I can defrag this system over the weekend and by time
> 8am Monday rolls around its already down to about 70%. I also balance
> the advfs domain. By Tuesday morning its nothing to see the
> aggregate IO down to like 30-35%. This is having a severe issue with
> performance.
>
> Does anyone have a suggestion to get around this? We have put
> together a lower end raid for simple storage and it has alleviated
> the primary issue but it has anything but solved it.
>
> Is there perhaps something I can do to help prevent this
> fragmentation via tweaking or is this just a fact of dealing with
> advfs and the movement of this amount of data?
>
> TIA.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ADVFS and fragmentation.
2003-08-01 17:53 ` bofh00
@ 2003-08-02 2:43 ` Bob Harris
2003-08-03 13:26 ` Bob Harris
0 siblings, 1 reply; 7+ messages in thread
From: Bob Harris @ 2003-08-02 2:43 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ADVFS and fragmentation.
2003-08-02 2:43 ` Bob Harris
@ 2003-08-03 13:26 ` Bob Harris
2003-08-04 14:24 ` bofh00
0 siblings, 1 reply; 7+ messages in thread
From: Bob Harris @ 2003-08-03 13:26 UTC (permalink / raw)
In article <harris-0A0ABF.22435701082003@juggl7.zk3.dec.com>,
Bob Harris <harris@zk3.dec.com> wrote:
> 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".
I have one other thought after re-reading this.
If there is only 1 pyramid file generated per original image and only
one process, is it possible that the generating program creates the
pyramid file as a sparse file initially, and fills in the different
resolutions a raster line at a time?
That is to say, the pyramid program calculates how much space will be
needed for each resolution, and decides on the offsets in the file that
each resolution will start.
Then the pyramid program reads each raster line of the original image,
and generates the 'n' different resolutions for that one raster line and
writes each resolution to its assigned offset in the file. It then
reads the 2nd raster line and generates all the resolutions and writes
those, etc...
Now maybe it reads 10 raster lines and generates each resolution.
I'm not trying to explain an algorithm I haven't clue about, but
trying to see if there is a pattern of data writing.
Anyway, if the program that builds the pyramid file uses lseek to write
the file, then that too would cause the file to appear fragmented. This
is because each sparse write to the file would allocate storage and the
storage would be allocated from the next available free space, but it
would be used in a non-contiguous manor.
There is no cure for this type of program behavior, short of rewriting
the program.
The simple rewrite would be to process each resolution one at a time so
that the pyramid file grows sequentially. The problem I see with this
is that it would entail re-reading the original 100MB to 1GB image file
over and over again. This could be a performance problem.
Another approach would be to write each resolution to a separate work
file and play some of the games I suggesed in my previous post of having
each work file go to a different volume or a different domain so that
they would no be fighting to get the same free space. After all the
resolutions have been created, then recombine them into one file. This
would reqire rereading and writing the resolution files, but it would
only be 1 pass vs the re-reading of the original huge image once per
resolution.
One more approach, create a fully allocated (by empty) pyramid file and
then write the resolutions. That is to say, first calculate the fully
populated size of the pyramid file, then sequentially write zeros to the
file (in large writes) until it is fully created and has allocated all
its storage. Now have the program that creates the pyramid file lseek
and overwrite the zeros with real data. This may be the most efficient
for creating a more contiguous file in that it only means 1 extra write
pass, with out any extra read passes and no extra time for AdvFS to
allocate extra space for work files that would be deleted.
Again, I am guessing at why your pyramid files are always fragmented,
even on mostly empty domains. The algorithms I have put forth I wild
guesses. In reality, they are most likely totally different from what
I've speculated. And I'm not trying to tell you the best way to
generate your pyramid files, I'm just trying to provide working ideas
that you can evaluate if they might be useful to you.
And again, I will ask. Does this existing pyramid file fragmentation
actually hurt your performance? If it does not, then it is not worth
trying to change the way they are written, just to make them contiguous.
Bob Harris
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ADVFS and fragmentation.
2003-08-02 1:23 ` Jack Patteeuw
@ 2003-08-04 14:19 ` bofh00
0 siblings, 0 replies; 7+ messages in thread
From: bofh00 @ 2003-08-04 14:19 UTC (permalink / raw)
On Sat, 02 Aug 2003 01:23:15 +0000, Jack Patteeuw wrote:
> So you have **ONE** AdvFS domain that is 800 GB ?!!
>
> How do you back that up, or don't you ? In the event of a failure of
> the RA8000, do you know how many **DAYS** it would to restore this
> amount of data ? Putting all of your eggs in one basket (domain) is
> asking for a disaster. (We recently has a RAID failure (different
> hardware and OS) and it took 3 days to rebuild ! SH*T happens !!)
>
> My first suggestion is to split the data into 4 domains. With enough
> CPU's you should be able to defrag those 4 over a weekend.
>
> jp
Yes it is one domain.
Yes we do back it up after I debated the issue for well over a year
with management.
I would say average backup time is about 18 hours which will improve
at some point since the backup system will be connected via a
dedicate GB line (currently only 100baseTx-FD). Obviously the time
it takes to back up is dependant upon the amount of data. I have seen
it take near 24 hours when there is approximately 760GB on the system.
It is backed up to a cheap IDE->SCSI raid5 on a remote system using
Bakbone Netvault software once per week. Yes, once per week. Pretty
crazy/stupid? *nod* All know the consequences. Hell could be worse
it could be the days when we had no backup and when I preached about
it I was just talking to brick walls. About half the data is in
some form replicated. For example the pyramid files I spoke of are created
from the TIFFs. Beacuse of this the most critical things to backup
are the tiffs in that situation and NOT the pyramids. Pyramid
generation is time consuming but not considered a major issue.
Basically to make a long story short they were willing to lose a
week of work if the system were to fail.
I have actually seen this raid fail but it was not hardware. There
was an issue apparently with ADVFS and the file table system
was corrupted. I worked with Compaq techs for nearly a week on
it.
I have also rebuilt this raid before and if I recall correctly (it
has been well over a year quite possibly two) it only took me a
matter of hours from scratch to get the raid up and running and then
a restore overnight. I have also had to restore about 600GB to the
system and it didnt even take a day to do so.
Ideally we would have this system raid1+0 or 0+1 along with a local
backup system setup to backup at least critical data. But Ill tell
you what...
You convince my boss to pay what it costs to do all of this the
"right way" and Ill be VERY grateful. Somehow though I suspect you
will have even less luck than I. They would not even fund a backup
system until we lost approximately 200GB of data.
With regard to using multiple domains I am not sure I follow you
as to why multiple ones would be better? Ill be the first to admit
that not only do I not know jack about ADVFS but Im also a novice
with regard to these systems. But how would using multiple domains
make any differnce in restore or recovery times? 800BG is 800GB.
Would it not actually take longer to rebuild multiple domains and
perform multiple restores in part due to interruption than a single
one? Also would we not also be forced to use seperate mounts for
each domain? Having multiple mounts is out of the question. It is
not even an option.
BTW, just to be clear it is 4 raid5 volumes (hardware side 6 drives
per volume) that compose a single advfs domain. Not one 24 drive
raid5 and one advfs domain.
Anyhow, I am open to any suggestions for better setup etc and
appreciate them
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ADVFS and fragmentation.
2003-08-03 13:26 ` Bob Harris
@ 2003-08-04 14:24 ` bofh00
0 siblings, 0 replies; 7+ messages in thread
From: bofh00 @ 2003-08-04 14:24 UTC (permalink / raw)
I suspect this scenerio you have described is close to the reality of
these pyramid files. The single pyramid file I posted about earlier is of
the type where its one resolution in one file. The other types which we
use far more often are all resolutions combined into a single file. In
either case they are fragemented.
Wether or not the fragmentation of these files is directly affecting
performance I cant say. I will try to run some tests to get an idea. I do
know though that the general fragmentation listed by the system is
definitely affecting performance. After running defrag users noticed a
significant increase in response times.
-Jason
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-08-04 14:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-31 15:26 ADVFS and fragmentation bofh00
2003-08-01 17:53 ` bofh00
2003-08-02 2:43 ` Bob Harris
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox