big performance boost with memcached / Freebsd
Liquid error: undefined method `login' for nil:NilClass : March 23rd, 2006
I've long been disappointed by memcached performance when dealing with objects bigger than a few kilobytes...
Well not anymore...
Turns out memcached is trying to make use of some TCP options which are meant to boost perfs, but turn out to be counter productive.
Eric Hodel mentions the solution on Fast Memcached on OSX and I'm happy to report the trick does wonders for FreeBSD as well.
All you need to do is undefine TCP_PUSH and recompile.
I ended up turning
into
#include "memcached.h"
into
#include "memcached.h"
#undef TCP_NOPUSH
Apple File Sharing (AFP) via FreeBSD
Liquid error: undefined method `login' for nil:NilClass : January 18th, 2006
So, I got a shiney new Mac Mini before Thanksgiving. Well, actually it was for my mom, but I ended up keeping it and buying her another. Longer story... In any case I love it, but it's a bit underpowered for heavy unit testing and other intense programming tasks. And I switched from a dual-screen Athlon 1800XP FreeBSD box, so I was feeling lagged for a bit.
So with the beautiful Mac OS X in front of me there was only one thing left to do with the FreeBSD box... *Apple file sharing*. :-)
I wanted to access files on the FreeBSD box from Finder, edit my Rails projects (on the FreeBSD box) using TextMate, and generally enjoy both the beauty of OSX and the horse-power of FreeBSD on faster hardware.
h2. Installation
I loosely followed the guide from: "http://viebrock.ca/article/22/file-sharing-from-linux-to-os-x-a-quick-guide":http://viebrock.ca/article/22/file-sharing-from-linux-to-os-x-a-quick-guide
Of course that guide is for Debian, hence this post for FreeBSD users.
Install from ports:
* netatalk
* howl
h2. Enable the necessary services
Add the following to /etc/rc.conf:
Add the following to /etc/rc.conf:
netatalk_enable="YES" afpd_enable="YES" mdnsresponder_enable="YES" mdnsresponder_flags="-f /usr/local/etc/mDNSResponder.confYou may not need the last line. I have NO idea where FreeBSD howl's mDNSResponder looks for it's config file. I *much* prefer Debian here (for how it gives you reasonable default files that get you started). h2. Setup and start afpd # Rename /usr/local/etc/AppleVolumes.default.dist removing the ".dist" # Change the last line to read as follows:
~ options:usedot,noadouble,nohex# /usr/local/etc/rc.d/netatalk.sh start The above configuration will allow things like subversion to work that use hidden "dot" files. h2. Test your setup You should now be able to do *Finder -> Go -> Connect to Server...* Connect to: afp://server_or_ip_address/ You should get a list of home directories to browse and mount. If not, you've done something wrong above. h2. Setup and start howl Next, we need to setup howl so that we can automagically find our FreeBSD box on the network. # Create /usr/local/etc/mDNSResponder.conf:
YourServer _afpovertcp._tcp local. 548 YourServer _ssh._tcp local. 22# /usr/local/etc/rc.d/mdnsresponder.sh start YourServer is the name that will show up in Finder... you should also be able to use *Terminal -> File -> Connect to Server...* and such for SSH now... Have fun!