[C#] can I get Memcached running on a Windows (x64) 64bit environment?
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:
64-bit binary of memcached 1.4.4 as Windows-service:
The 64-bit version does have the wrong uptime.
So maybe you want this binary of 1.4.2 instead:
The 32-bit version as included with MemCacheDManager also suppors running on Windows 2000 (no IPv6):
To unpack the msi:
msiexec /a Releases_MemCacheDManager_1_0_3_0.msi /qb TARGETDIR=c:\memcached
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.
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...
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 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...
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.
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 :)
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.
It's a windows service and it works perfectly well in a production environment: