views:

6838

answers:

11

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 (hopfully!) 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 workng 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??

Any help or recommendations appreciated...


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...

Many thanks.

A: 

Are you sure that the 32-bit version doesn't just run on 64-bit Windows, without modification? Most things do.

Failing that, have you actually tried just compiling it for 64-bit? A brief scan of a few Google Groups etc where people asked this same question suggests that that may be exactly the solution to this. I think you're probably overestimating the difference between 32-bit and 64-bit Windows (at least as far as compiling a native application goes).

DannySmurf
+2  A: 

I personally feel that you'd have to recompile the application using a 64-bit compiler (obviously on a 64-bit machine) to get the most of Memcached on a 64-bit platform. This may not be an easy task depending on the code. If it was written with 64-bit portability in mind then it could be a simple recompile. If it hasn't, then you could well be up for quite a bit of patching before getting it to build.. and then you'd have to verify that you haven't broken anything!

I don't think you're overestimating the differences between 32 and 64-bit at all. A common mistake is to assume that the job is a simple recompile when in fact it isn't. There are more portability issues than most people realise. Just because the application builds and you end up with a binary, it doesn't mean that the binary is going to behave as it should. Especially when it may interact with other 32-bit code.

Having said that, it might be worth giving it a spin!

Good luck. Cheers!


@Lars: I recommend reading the question before attempting an answer.

@John Sibly & @DannySmurf: given the nature of Memcached and what it aims to achieve, surely you wouldn't want to run a 32-bit version on a 64-bit machine? If you had a 64-bit capable machine it would make sense to run a 64-bit version to make the most of the features of the hardware.

OJ
+1  A: 

Dude, Codeplex is your friend -> check out this port of it. It used to have a 64bit release, but u can either download the latest and compile for 64bit (pretty easy) or check the previous releases.

Pure.Krome
Hi Pure.Krome, thanks for the info but I have seen this page and I have never seen 64 bit server version. And no - as per OJ's answer above, you cannot just "easily" compile to 64bit unless the code has been written that way, and working with memory is always a bad place to test that theory...
RobertTheGrey
hmm. ahh -> the x64 bit was the BETA version, so it's been replaced by some more recent updates. it was found here: http://www.codeplex.com/memcachedproviders/Release/ProjectReleases.aspx?ReleaseId=10041
Pure.Krome
+1  A: 

Hi,

I was just searching for memcached on a 64bit Windows system and found this. So far there isn't any Win64 memcached version. But I just started the memcached.exe with the appropriate commands via cmd and it's just running fine. I'm using Windows Vista 64bit, don't know if there are any differences between Vista and the server versions.

Kindest regards Fleshgrinder

Thanks for this - starting it from the cmd wasn't the issue - installing it as a service was the problem.regards,Rob G
RobertTheGrey
+6  A: 

I just installed version 1.2.6 as service on my Windows Server 2008 64 bit using MemCacheD Manager and it works like a charm!

zvolkov
+1 It works for me :)
panchicore
A: 

I had problens across the board for Windows 7 64 bit until I ran at as Windows XP... it then started as a service and everything... phew

David
+1  A: 

a 1.4.2 version with service code from original port(i think 1.2.1) compiled for windows 64 bit can be found on my blog: memcached 64-bit windows

Uriel Katz
+1  A: 

The 32 bit version run on 64 bit via WOW64 but the process is still limited to 2GB,with a 64-bit version you can go beyond that to more than a single machine will have.

Uriel Katz
+14  A: 

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

http://blog.northscale.com/northscale-blog/2009/12/memcached-windows-64-bit-pre-release-available.html

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

zvolkov
NorthScale works like a charm
ram
I don't have rep to edit, but the 1st link here is not currently correct; a hyphen is needed between 64 and bit: http://blog.northscale.com/northscale-blog/2009/12/memcached-windows-64-bit-pre-release-available.html
Maggie
thanks @Maggie!
zvolkov
A: 

Currently works with no problem on the dev. machine: memcached-win64-1.4.4-14 from http://labs.northscale.com/memcached-packages/ with ZendServer-CE-php-5.3.2-5.0.1-Windows_x86.

battal
A: 

FYI, I couldn't get the 64 bit version (from here http://labs.northscale.com/memcached-packages/) to install as a service until I ran memcached as administrator.

I just went to the executable's properties, then the Compatibility tab, and checked "Run this program as an administrator" (There a ton of other ways to do this, but it seemed simplest)

Then I was finally able to successfully run: memcached -d install

Don't forget to start the service after it is installed too :)

Jasper