Can I get Memcached running on a Windows (x64) 64bit environment?

58,931

Solution 1

North Scale labs have released a build of memcached 1.4.4 for Windows x64:

http://blog.couchbase.com/memcached-windows-64-bit-pre-release-available

http://labs.northscale.com/memcached-packages/

UPDATE: they have recently released Memcached Server - still FREE but enhanced distro with clustering, web-based admin/stats UI etc. (I'm not related to them in any way) Check it out at http://northscale.com/products/memcached.html and download at: http://www.northscale.com/download.php?a=d

UPDATE 2: NorthScale Memcached is no longer available as a standalone download. Now they have made it part of their commercial No-SQL DB offering called Membase. It can be configured to run in Memcached-only mode (i.e. without persistence) and there's a 100% free version too. Check it out here: http://www.membase.org/downloads

UPDATE 3: MemBase has slept with CouchDB and produced a hybrid product offering, called CouchBase. They still do offer a free "Community" version at http://www.couchbase.com/download

Solution 2

Just so people know, the 32-bit and 64-bit version as build by the good people from membase/couchbase/whatever is still available the blog URL has changed though:

32-bit binary of memcached 1.4.4 as Windows-service:

http://blog.couchbase.com/memcached-144-windows-32-bit-binary-now-available

http://s3.amazonaws.com/downloads.northscale.com/memcached-win32-1.4.4-14.zip

64-bit binary of memcached 1.4.4 as Windows-service:

http://blog.couchbase.com/memcached-windows-64-bit-pre-release-available

http://s3.amazonaws.com/downloads.northscale.com/memcached-win64-1.4.4-14.zip

The 64-bit version does have the wrong uptime.

So maybe you want this binary of 1.4.2 instead:

http://www.urielkatz.com/archive/detail/memcached-64-bit-windows/

The 32-bit version as included with MemCacheDManager also suppors running on Windows 2000 (no IPv6):

http://allegiance.chi-town.com/MemCacheDManager.aspx http://allegiance.chi-town.com/Download.aspx?dl=Releases/MemCacheDManager_1_0_3_0.msi&rurl=MemCacheDManager.aspx

To unpack the msi:

msiexec /a Releases_MemCacheDManager_1_0_3_0.msi /qb TARGETDIR=c:\memcached

Solution 3

Up-to-date Binaries

NorthScale has really old versions (the newest is 1.4.5 which is from April 2010) but there's a guy who offers 64-bit Memcached binaries for Windows compiled using Cygwin (but they don't require it installed) in his GitHub repository github.com/nono303/memcached.

For example, the binaries of the most recently released version (as of writing this answer) 1.5.16 are here. There're both 32 and 64-bit versions.

Memcached as a Windows Service

If you want to install it as a Windows service, you can use for example the open-source Non-Sucking Service Manager:

nssm install memcached c:\path\to\memcached.exe
nssm start memcached

See the documentation for details.

Solution 4

Memcached 1.4.5 binary for win x64 can be found here: http://downloads.northscale.com/memcached-1.4.5-amd64.zip

Another option would be to install Couchbase Server 1.8.0 x64 from here: http://www.couchbase.com/download, the bundled memcached seems to be version 1.7.1.1 (sounds like an internal version, I can't tell which is the real one)

As for running memcached as a service, this tutorial might be enough:

http://www.richardnichols.net/2010/08/install-memcached-on-windows-server/

Solution 5

I have an memcached-1.2.1 for win32 originally downloaded from here: http://jehiah.cz/projects/memcached-win32/ (but now for some reason it is a broken link).

This is how I managed to run memcached for Win32 on Windows Server 2008 R2, 64 bit. memcached.exe -> properties -> Compatibility -> Run this program in compatibility mode for: Windows XP (SP 3). Notice that the user Uriel Katz mention in this discussion that this method restricted to 2GB memory of use.

Share:
58,931
codingguy3000
Author by

codingguy3000

I can has coding?

Updated on July 08, 2022

Comments

  • codingguy3000
    codingguy3000 almost 2 years

    Does anyone know IF, WHEN or HOW I can get Memcached running on a Windows 64bit environment?

    I'm setting up a new hosting solution and would much prefer to run a 64bit OS, and since it's an ASP.Net MVC solution with SQL Server DB, the OS is either going to be Windows Server 2003 or (hopefully!) 2008.

    I know that this could spill over into a debate regarding 32bit vs 64bit on servers, but let's just say that my preference is 64bit and that I have some very good reasons.

    So far, I've tried a number of options and found a bit of help related to getting this up on a 32bit machine (and succeeded I might add), but since the original Windows port is Win32 specific, this is hardly going to help when installing as a service on x64. It also has a dependency on the libevent for which I can only get a Win32 compiled version.

    I suspect that simply loading all this up in C++ and hitting "compile" (for 64bit) wouldn't work, not least because of the intricate differences in 32 and 64bit architectures, but I'm wondering if anyone is working on getting this off the ground? Unfortunately, my expertise lie in managed code (C#) only, otherwise I would try and take this on myself, but I can't believe I'm the only guy out there trying to get memcached running on a 64 bit Windows server....am I?


    Update

    Yes I'm afraid I'm still looking for an answer to this - all my efforts (with my pathetic C++ skills) to make a stable build have failed - I've trashed one server and 3 VM's just trying it out so now I turn to the real experts. Is anyone planning on porting this to 64bit? Or are you really suggesting that I use MS Velocity instead? I shudder at the thought.


    Update: @Lars - I do use Enyim actually - it's very good, but what you're referring to is a client, rather than the server part.

    @DannySmurf - I've only been able to install it as a service on a 32 bit OS. 64 bit OS rejects the installation of this Win32 service. Of course yes, lots of Win32 code works seamlessly on x64 architecture, hence you can run 32bit apps (like Office for instance) or games on Vista/XP 64 etc, but this doesn't translate directly when it comes to services. I'm no expert, I suspect that it has to do with the syncs or eventing that services need to subscribe to, and I suspect that 64 and 32 don't play nicely. I'm happy to be corrected on any of this, but to answer your question - yes I have tried.

    @OJ - thanks very much for the straight-forward response. I thought as much, but wasn't sure if anyone else had suggestions or had already gone down this route. Maybe when StackOverflow is LIVE, then more people will respond and let me know if this is something being looked into, and although I can try and compile it myself - I simply can't "trust" (with my C++ experience level) that it would provide "Enterprise Level" reliability in such a crucial component of large scalable solutions. I think it would need educated intervention rather than my unsanitised experimental approach before I could be confident. One little oversight on my part, could bring the site down. Oh well... till next time.