I tracked my problem down to really, *really* bad behaviour of SQLite
databases on a btrfs file system.   That, and updatedb for the locate
program was taking may hours to scan my disk.  Conseqeuently, very
little of my disk was in RAM and performance was awful.

Between tweaking updatedb's conf file, changing btrfs compression from
gzip to lzo, and getting the 2.6.38 kernel with various btrfs fixes,
things have improved dramatically.


Also, I wrote the following script to defragment btrfs.  This runs overnight 
and seems to help:

#!/bin/bash
# This finds files with lots of fragments, then defragments them.   Thunderbird 
has sqlite databases
# that get *very* fragmented.

{
for tree in $(mount | awk '$2=="on" && $4=="type" && $5=="btrfs" {print $3;}')
do
  ionice -c3 find -L $tree -xdev -type f -size 320k -mtime -60 -execdir 
filefrag {} +
done
} |
awk '{n=$(NF-2) + 0; if(n>40) {i=match($0, ": [0-9]+ extent.*found"); print 
substr($0, 1, i-1);}}' |
{
while read f
do
  btrfs filesystem defragment "$f"
done
}


** Package changed: thunderbird (Ubuntu) => btrfs (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/681183

Title:
  Thunderbird hangs and greys out for 10-20 seconds

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs/+bug/681183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to