On Mon, Apr 26, 2004 at 04:27:55PM -0500, Mike Horwath wrote:
On Mon, Apr 26, 2004 at 04:28:21PM -0400, Chris Shenton wrote:
So if others are using NetApp for Maildirs, I'd like to hear about your experiences, too.
We are.
One of the hackeries I did was from a patch someone else had done to Courier-IMAP for the POP server.
It likes to 'read the message 1 byte at a time' to verify the size.
I changed all occurences of that to instead just use stat() on the file and return the size.
This dropped the usage over NFS from 160Mbps to just over 20Mbps over the gig interface.
30K mailboxes, Postfix using Maildir storage, Courier-IMAP with the above 'fix', servicing POP and IMAP to our customers.
Even better - hack the LDA to encode the size into the name of the message like './new/1082945416.7901_0.a.lds,S=2161' which allows the pop server to build the UIDL and LIST directly from READDIR. No stats, no opens, no reads. It's a beautiful thing. Users are able to load boxes > 100k messages in fraction of seconds with virtually no load on the NetApss.
This hack breaks RFC compliance (by not couting newlines as two bytes) but we've been running like this for >1yr without any complaints on about 40k boxes.
You can, of course, hack the LDA to scan the messages and insert the RFC compliance size if you feel so inclined.
Other important hacks to courier are to make it batch moves and unlinks until the end of the session, allowing for faster logins. Do any box maintenance like moving from /new to /cur or removal of messages AFTER the client has disconnected. I also recomend truncating the hostname in the maildir message to save on directory space. Our only concern with Maildir on the netapp is that a user could reach the max_directory size and strange things would start to happen.
The result is faster response to the customer, less load on the filers and better all around happiness for everyone involved. Why courier doesn't run like this out of the box -- I don't know. It's so obiously the best way to do it.