Trond Norbye's Weblog

« Previous day (Jan 7, 2008) | Main | Next day (Jan 8, 2008) »

http://blogs.sun.com/trond/date/20080108 Tuesday January 08, 2008

Memcached in Solaris

I have been working on integrating Memcached into OpenSolaris for a while, and it is now integrated and available if you would like to try it!

The Memcached server is controlled by SMF and needs to be configured before it can be started. You must at least specify the username for the user you would like memcached to run as, and you would probably like to increase the amount of memory the server should use. In the following example I am using the user nobody and 2GB of memory (note: you should not exceed the physical amount of RAM available)

# svccfg
svc:> select memcached
svc:/application/database/memcached> setprop memcached/options=("-u" "nobody" "-m" "2048")
svc:/application/database/memcached> quit
# svcadm refresh memcached
        

You can now start memcached by executing:

# svcadm enable memcached
        

And to monitor the status om memcached, you can just execute:

$ svcs memcached
STATE          STIME    FMRI
online         08:20:03 svc:/application/database/memcached:default
        

To shut down the memcached server, execute:

# svcadm disable memcached     
        

Please see memcached(1m) for more information.


Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.