| To: | Eric Sandeen <sandeen@xxxxxxx> |
|---|---|
| Subject: | Re: howto preallocate to minimize fragmentation |
| From: | Ying-Hung Chen <ying@xxxxxxxxxxxxxx> |
| Date: | Fri, 23 Sep 2005 14:31:12 +0800 |
| Cc: | linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <4332D17E.6060608@sgi.com> |
| References: | <43329839.2070005@yingternet.com> <4332A22B.6070708@sgi.com> <4332BFCC.8050803@yingternet.com> <4332C248.70503@sgi.com> <4332C636.9070509@yingternet.com> <4332CE65.2000500@animezone.org> <4332CF04.2060604@yingternet.com> <4332D17E.6060608@sgi.com> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla Thunderbird 1.0.6 (Windows/20050716) |
> > run xfs_bmap on a few files, and see how bad it really is. That number > can be misleading, sometimes. > > but preallocation is an easy way to mitigate any fragmentation problems. > > something like this: > when I run the sample code, and created "testfile" [yhchen@fc3 ~]$ ./xfs_fcntl testfile [yhchen@fc3 ~]$ ls -l testfile -rwx------ 1 yhchen yhchen 0 Sep 23 14:17 testfile [yhchen@fc3 ~]$ du testfile 20480 testfile [yhchen@fc3 ~]$ du -h testfile 20M testfile I see the filesize is 0, but du does show 20MB However, when I try to determine the file size via fseek, it returns 0. so, what does this kind of allocation mean? does it really mean that it DID allocate 20MB for this file so, if I write anything within this 20MB range, it will be writing to the allocated space and hence no fragmentation? what happens if I go over? my guess is if i go over, xfs allocation algorithm will be and there will be fragamentation? Thanks, -Ying |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | TAKE 943122 - mongo header update, Nathan Scott |
|---|---|
| Next by Date: | Re: xfs_repair: dinode.c:2436: process_dinode_int: Assertion `err == 0' failed., Jan Derfinak |
| Previous by Thread: | Re: howto preallocate to minimize fragmentation, Eric Sandeen |
| Next by Thread: | Re: howto preallocate to minimize fragmentation, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |