Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Platforms for running memcached

Is there any reason in particular why it's recommended to run memcached on a Linux server? Is it really that bad an idea to run it on a Windows Server box? What about an OS X Server box?

The biggest reason that I read is about TCO. In other words, for each windows box that we run memcached on, we have to buy a copy of Windows Server and those costs add up. The thing is that we have several servers that have older processors but a lot of RAM - perfect for memcached use. All of these boxes already have Windows Server 2003 installed on them, so there's not really much savings to installing Linux. Are there any other compelling reasons to use Linux?

like image 446
Jason Baker Avatar asked Feb 25 '09 14:02

Jason Baker


People also ask

Is Memcached still used?

Just a note: as it was confirmed by the current maintainer on Twitter, Memcached is still actively developed / maintained.

How does Facebook use Memcached?

Facebook used memcached as a building block to construct a distributed key-value store and scaled from a single cluster of memcached server to multiple geographically distributed clusters. Facebook uses memcached because it provides low latency access to a shared storage pool at low cost.

Is Memcached better than Redis?

Architecture. Redis uses a single core and shows better performance than Memcached in storing small datasets when measured in terms of cores. Memcached implements a multi-threaded architecture by utilizing multiple cores. Therefore, for storing larger datasets, Memcached can perform better than Redis.


4 Answers

This question is really "what are the advantages of Linux as a server platform" I'll give a few of the standard answers:

  • Easier to administer remotely (no need for RDP, etc.) Everything can be scripted or done via CLI.
  • Distributions like the Ubuntu LTS (Long Term Support) versions guarantee security updates for years with zero software cost. Updates can easily be installed via command line, and generally don't require a reboot.
  • Higher performance. Linux is generally considered to offer "more bang for the buck" on a given piece of hardware. This is generally due to lower resource requirements.
  • Lower resource requirements. Linux runs just great on 256MB or less of RAM, and on very small CPUs
  • Breadth of available software & utilities.
  • It's free. (As in beer)
  • It's free. (As in freedom) This means you can see, change, and file bugs against the code you're running, and talk directly with the developers.

Remember, that TCO includes the amount of time that you (the administrator) are spending to maintain the machine. Linux has a lower TCO because it's easier to maintain, and you can spend your time doing something other than administering a server...

like image 127
slacy Avatar answered Oct 24 '22 15:10

slacy


Almost all of the FAQs and HOWTOs are written from Linux point of view. Memcache was originally created only for Linux, the ports came later. There is port to Windows, but it's not yet in the official memcache distribution. Memcache on Windows is still guerrilla style. For example there is no memcache for x64 Windows.

As of memcache on MacOS X on servers: niche of niche of niche.

like image 43
vartec Avatar answered Oct 24 '22 15:10

vartec


There doesn't seem to be any technical disadvantage to running it in windows. It's mainly a cost thing. If the licenses are just sitting around unused, there's probably no disadvantage at all. I do recall problems on older windows with memory leaks in older windows APIs, particularly the TCP stuff -- but presumably that stuff is all fixed in modern windows.

like image 23
jettero Avatar answered Oct 24 '22 15:10

jettero


If you are deploying memcached you probably have a fairly significant infrastructure (many, many machines already deployed). Even if you are dedicating new machines to memcached, you'll want to run some other software on them for system management, monitoring, hardware support etc. This software may be customised by your team for your infrastructure.

Therefore, your OS platform choice will be guided by what your operations team and hardware vendor will support for use in production.

The cost of a few Windows licences is probably fairly immaterial and you probably have a bulk subscription already - in fact the servers may be ordered with Windows licences already on them.

Having said that, you will definitely want a 64-bit OS if you're running memcached - using a 32-bit OS is not clever and will mean that most of your RAM cannot be used (you'll be limited to around 3G depending on the OS).

I'm assuming that if you're deploying memcached, you'll be doing so on hardware with LOTS of ram - it's pretty pointless otherwise, after all.

like image 38
MarkR Avatar answered Oct 24 '22 14:10

MarkR