[linux-lvm] very slow fw performance when snapshots active

Gabriel Barazer gabriel at oxeva.fr
Thu Oct 18 13:52:36 UTC 2007


Hi,

On 10/18/2007 10:39:50 AM +0200, Falko Zurell <falko.zurell at idmedia.com> 
wrote:
> 
> Then I edit a 2 GB text file on /opt (XFS filesystem) with vi (just
> hitting "enter" and save this minor change). This will take minutes to
> finish the vi during saving.

This problem is not lvm-related: when opening a file with vim, it reads 
the entire file into memory (even if the file is 2GB), marks the changes 
into a .swp file. When saving, vim rewrites the entire file in place, 
effectively changing 2GB of copy on write blocks. This happens every 
time, with or without snapshot, the latter being worse because of the 
cow overhead.

for reading-only very large files, "less" or "more" read files on-demand 
which is a far more effecient way.

for writing, I don't know any method allowing to safely write a small 
change into a large file, except using awk or perl parsing (which reads 
the entire streamed file anyway)

Gabriel




More information about the linux-lvm mailing list