* Maximizing and maintaining fragmentation
@ 2004-02-13 19:33 Timothy Miller
2004-02-14 3:30 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Timothy Miller @ 2004-02-13 19:33 UTC (permalink / raw)
To: Linux Kernel Mailing List
A colleague and I are doing some experiments, and we are attempting to
model the layout of the filesystem on our server at work. We're using
that model because of certain challenges with the very deep directory
structure.
We are copying about 30GB to one of our personal computers here on the
LAN and in order to introduce file fragmentation (to simulate what is
probably the case in the working environment), we are running 3 tar
pipes at the same time.
(Interesting: the combination of the disk access and the built-in NIC
on the ABIT KV7 make the kernel use about 70% of the CPU, and user space
is using all of the rest. We're only doing 100 megabit ethernet, so
what gives?)
Now, since the actual data is proprietary, we want to run a program on
the data after we've copied it which will scramble the actual file
contents before we remove it from the building (we are not concerned
about compressibility). But we do not want to alter the structure of
the data on disk in any other way. If the scrambler were to determine
the file size of the original file, write out random data of that same
size, and then copy the new file over the old one, that would likely
reduce or eliminate the fragmentation.
My proposal is to open and mmap each file and scramble the data by
writing to the file in virtual memory. When the file is unmapped and
closed, I am assuming that the new data will get written to the same
physical locations on disk as the original file.
IMPORTANT QUESTION: When writing to an mmap'ed file, will ext3
rearrange blocks on disk in order to reduce fragmentation, or will it
leave the blocks exactly where they are, just overwriting the data?
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Maximizing and maintaining fragmentation
2004-02-13 19:33 Maximizing and maintaining fragmentation Timothy Miller
@ 2004-02-14 3:30 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2004-02-14 3:30 UTC (permalink / raw)
To: Timothy Miller; +Cc: linux-kernel
Timothy Miller <miller@techsource.com> wrote:
>
> IMPORTANT QUESTION: When writing to an mmap'ed file, will ext3
> rearrange blocks on disk in order to reduce fragmentation, or will it
> leave the blocks exactly where they are, just overwriting the data?
The blocks will not change.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-14 3:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-13 19:33 Maximizing and maintaining fragmentation Timothy Miller
2004-02-14 3:30 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox