Hi Ken, On Saturday Mar 08 2014, Ken Mankoff <[email protected]> wrote:
> There was some previous discussion of the speed of "mu index" > here: > https://groups.google.com/forum/#!msg/mu-discuss/-K5O1uoP7bQ/n49EreaQtlAJ > > I'm now on an SSD (MacBook Pro w/ 1 TB SSD primary and the 1TB platter now > in the CD-rom bay). I really REALLY like mu4e, but it is unusably slow on > OS X and I don't think I can keep using it in the current state. I'm happy > to try to help debug this, and hope it gets solved so I can make this my > primary mail client. If I try to run mu outside of emacs so that the > slowness isn't directly affecting a program I'm actively using, I get the > locking errors since mu4e is also running. If I run it in emacs with (setq > mu4e-update-interval 300), then when I try to do something during the time > that mu is indexing, everything gets messed up, and mu4e does not seem to > recover gracefully (i.e. maildirs don't properly open, or searches return > nothing, until I kill and restart mu). > Based on the earlier thread where Dirk posted his timings, it seems to be > an OS X issue? I'm using an SSD, have 8 GB of RAM, and an old CPU (2.26 > GHz). I wrote the indexing code in 2008 or so (time flies!), and I'm using some Linux-specific tricks, such as sorting by inode before indexing -- perhaps similar tricks are possible on OS X. Or perhaps the Mac drive is slow; although I can hardly imagine it would be so much slower than Linux. ,---- | % sudo hdparm -Tt /dev/sda | | /dev/sda: | Timing cached reads: 24630 MB in 2.00 seconds = 12332.61 MB/sec | Timing buffered disk reads: 356 MB in 3.01 seconds = 118.46 MB/sec `---- > Perhaps it is not a mu-specific problem, since it takes 2 seconds just to > list the maildir folder. This is after repeat runs, so I am taking > advantage of caches: > > $ time ls -R1 ~/Maildir > /dev/null > real 0m1.744s > user 0m1.118s > sys 0m0.080s > > $ ls -R1 Maildir/|wc -l > 106086 > > Although mu index only searches 60k files, since 40k have a ".noupdate" > > And after repeated runs of mu index with no new mail: > > $ time mu index > indexing messages under /Users/mankoff/Maildir [/Users/mankoff/.mu/xapian] > | processing mail; processed: 61575; updated/new: 0, cleaned-up: 0 > cleaning up messages [/Users/mankoff/.mu/xapian] > - processing mail; processed: 61609; updated/new: 0, cleaned-up: 0 > elapsed: 1 second(s), ~ 61609 msg/s > \ processing mail; processed: 61609; updated/new: 0, cleaned-up: 0 > elapsed: 6 second(s), ~ 10268 msg/s > > real 0m5.621s > user 0m0.966s > sys 0m2.384s > > $ mu --version > mu (mail indexer/searcher) version 0.9.9.5 > > and xapian 1.2.17. > > Searching is also much slower than Dirk's earlier report, although I don't > mind waiting a few seconds for a search: > > $ time mu find hello |wc -l > 2555 > real 0m1.031s > user 0m0.165s > sys 0m0.287s > My times are a bit better (with about half the amount of message): ,---- | % time mu find hello | wc -l | 2105 | 0.03s user 0.02s system 98% cpu 0.057 total `---- > Please help (if possible). If not I'll be forced to go back to alpine, > which is great, except it doesn't search well, and doesn't integrate > with Org... I have a Macbook lying around, and when I have some time, I'll happily work on this... but I am quite busy with other stuff (obviously I'm waiting for Google or Facebook to buy mu4e for a few $10E9 :) In other words, there's an interesting task waiting for some MacOS-based hacker -- some profiles (such as what Linux' perf tool produces) would be a great start. Cheers, Dirk. -- Dirk-Jan C. Binnema Helsinki, Finland e:[email protected] w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C -- You received this message because you are subscribed to the Google Groups "mu-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
