microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.85k stars 5.38k forks source link

X86 release? #344

Open ErcinDedeoglu opened 9 years ago

ErcinDedeoglu commented 9 years ago

I'm looking for X86 release. I couldn't find release for x86 in https://github.com/MSOpenTech/redis/releases

I tried self build, but i'm not good on it. I got by Visual Studio

"Severity Code Description Project File Line Error C2365 'fdapi_fstat64': redefinition; previous definition was 'data variable' Win32_Interop c:\program files (x86)\windows kits\10\include\10.0.10150.0\ucrt\sys\stat.h 237"

If possible could you release x86 versions too. Thanks.

enricogior commented 9 years ago

Hi @fancyfanta currently we don't officially support x86 even if we try not to break it in order to allow users to compile it themselves. What version of Visual Studio and what version of Windows are you using? Thank you.

ErcinDedeoglu commented 9 years ago

Hi @enricogior Sorry for delayed response. I'm using Visual Studio 2015 and Windows 10 and 7 on two developer computer. I need to run Redis on Windows 7 X86 (Kiosk system)

ErcinDedeoglu commented 9 years ago

Can you release for X86 too please?

enricogior commented 9 years ago

@fancyfanta the x86 release hasn't been supported in a while and currently we don't have resources to allocate on the project, but it should be straight forward to compile it using Visual Studio 2013 on Windows 7.

fratuz610 commented 8 years ago

Re Windows 7 kiosk Same story here :) 2.8.x builds fine targeting 32bit systems if you use VC 2013 but won't build on VC2015

After wasting 4 hours (installing VC2015 then VC2013) I've managed to do the build on a Amazon EC2 instance and put the binaries online at http://fratuz610.s3.amazonaws.com/upload/public/redis-builds/x86/redis-windows-x86-2.8.2104.zip

I've done a quick test and everything seems to work OK: redis starts OK and works as it should but I haven't run it for days or weeks yet, so no guarantees

Will blog about it when I get more testing done

Hopefully I will find the time to

Stefano

enricogior commented 8 years ago

Hi @fratuz610 on Monday we will release 3.0 RC2 that, among other fixes, contains some important fixes for the 32-bit support.

fratuz610 commented 8 years ago

@enricogior Thx for letting me know and for the excellent work porting Redis to Windows

ErcinDedeoglu commented 8 years ago

@fratuz610 (Stefano) Thank you very much for supporting my issue. What's your blog url? How can i follow your builds?

@enricogior Thank you very much. I really need x86 builds for production level.

fratuz610 commented 8 years ago

@fancyfanta http://bitsandpieces.it/redis-x86-32bit-builds-for-windows

SimpleSimple commented 8 years ago

@fratuz610 hi,i found the exe file not running in windows xp system

fratuz610 commented 8 years ago

@SimpleSimple You are absolutely correct I think the issue is what is discussed here

I need this fixed as well so I will publish the updated exes in the next few days (max 1 week)

Stefano

fratuz610 commented 8 years ago

@SimpleSimple I've updated my blog post and uploaded a recompiled version of Redis that targets WinXP and up.

I've done some quick testing on a XP vm and it does start correctly now

Let me know if you have any trouble

Btw what I needed to do was to set the property Linker -> System -> SubSystem to 5.01 (WinXP 32bit) for all executable projects

Stefano

ErcinDedeoglu commented 8 years ago

@fratuz610 you are awesome. But msopentech guys should do this. How they can blind like this. Many OS using X86 still. And they will continue to use. I'm working in a kiosk system factory. And forexample today we produced 120 kiosk with windows x86 os. So this should support x86 officially.

fratuz610 commented 8 years ago

Thanks @fancyfanta

More info on my blog post

Re: Kiosks and WIndows Yes it's very funny how WinXP 32bit is very much alive and kicking (in its POSReady and XP for embedded devices forms) but MS seems to forget about it. Running Win 7/8/10 on a POS device with a celeron CPU and 2gb RAM doesn't make much sense

execoma commented 8 years ago
fratuz610 commented 8 years ago

@execoma Is redis crashing? or simply showing ever increasing memory allocation?

By default, on Linux, Redis never releases memory back unless it's forced to do so by the OS I'm not sure how the memory allocator works in the ported Windows version but I wouldn't be surprised if the behaviour is similar.

I always recommend running Redis with an appropriate eviction policy (volatile-lru) + max_memory set in order to avoid unexpected consequences (http://redis.io/topics/lru-cache)

As a side note I've been using the ported Redis builds on a Win XP machine continuously for 400hrs without crashes and with memory consumption consistently under 100mb

Stefano

execoma commented 8 years ago

@fratuz610 You're right (volatile-lru worked). But why Redis never releases the memory? When all keys TTL=0 and all keys removed, memory never releases.

fratuz610 commented 8 years ago

@execoma Redis under linux never releases previously allocated memory unless it's asked to by the operating system (sending a low memory warning). This is because allocating memory is expensive computationally

Moreover under Linux Redis can be compiled with different memory allocators (jemalloc by default) which use different policies and are more or less aggressive in allocating and/or returning memory to the OS

Under Windows things are different for sure but am not 100% certain how the memory allocation bit has been ported

Establishing real memory usage for applications is one of the most complicated tasks under both Windows and *nix systems as modern OSs always tend to over allocate memory compared to the physical availability