| To: | Ying-Hung Chen <ying@xxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: howto preallocate to minimize fragmentation |
| From: | Eric Sandeen <sandeen@xxxxxxx> |
| Date: | Fri, 23 Sep 2005 07:58:09 -0500 |
| Cc: | linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <4333A130.7040709@xxxxxxxxxxxxxx> |
| References: | <43329839.2070005@xxxxxxxxxxxxxx> <4332A22B.6070708@xxxxxxx> <4332BFCC.8050803@xxxxxxxxxxxxxx> <4332C248.70503@xxxxxxx> <4332C636.9070509@xxxxxxxxxxxxxx> <4332CE65.2000500@xxxxxxxxxxxxx> <4332CF04.2060604@xxxxxxxxxxxxxx> <4332D17E.6060608@xxxxxxx> <4333A130.7040709@xxxxxxxxxxxxxx> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla Thunderbird 1.0.6 (Macintosh/20050716) |
Ying-Hung Chen wrote: 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 run xfs_bmap on the resulting file and you'll see... so, if I write anything within this 20MB range, it will be writing to the allocated space and hence nofragmentation? right. what happens if I go over? my guess is if i go over, xfs allocation algorithm will be and there will be fragamentation? well it depends on what else is going on; if there is plenty of free space after that 20M, then no. but if you have parallel streams writing, then fragmentation past the amount of space you allocated is likely. -Eric |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | problems with full filesystem?, Andrew Lyons |
|---|---|
| Next by Date: | Re: problems with full filesystem?, Eric Sandeen |
| Previous by Thread: | Re: howto preallocate to minimize fragmentation, Ying-Hung Chen |
| Next by Thread: | xfs_repair: dinode.c:2436: process_dinode_int: Assertion `err == 0' failed., Jan Derfinak |
| Indexes: | [Date] [Thread] [Top] [All Lists] |