[mythtv-users] Slow MySQL query after delete

Andrew Burgess aab at cichlid.com
Sun Sep 2 20:43:27 UTC 2007


Mike said:

>Exactly.  See
>http://www.gossamer-threads.com/lists/mythtv/users/261922#261922 .
..
>You may find
>http://www.gossamer-threads.com/lists/mythtv/users/278818#278818
..

Both interesting.

As for ext2/3 defrag, copying the file seems to help. With a
1GB file on a 200GB filesystem that has no doubt filled many
times in the past:

  athlon:video > filefrag 1036_20070814140000.mpg
  1036_20070814140000.mpg: 112 extents found, perfection would be 8 extents

  athlon:video > cp 1036_20070814140000.mpg foo

  athlon:video > mv 1036_20070814140000.mpg foo2; mv foo 1036_20070814140000.mpg

  athlon:video > filefrag 1036_20070814140000.mpg
  1036_20070814140000.mpg: 11 extents found, perfection would be 8 extents

The fs is 80% full now so YMMV.

Also, there is a new kernel feature that relates to this:
http://kernelnewbies.org/Linux_2_6_23#head-fe852f5c60b8599eb7d48ffc0d17008300290223

"fallocate() is a new system call being proposed here which
will allow applications to preallocate space to any file(s)
in a file system. Applications can use this feature to avoid
fragmentation to certain level"...



More information about the mythtv-users mailing list