Domanda

I'm using Redis-server for windows ( 2.8.4 - MSOpenTech) / windows 8 64bit.

It is working great , but even after I run :

enter image description here

I see this : (and here are my questions)

enter image description here

Question :

— Didn't I just tell it to erase all DB ? so why are those 2/3 huge files are still there ? How can I completely erase those files? ( without re-generating)

NB It seems that it is doing deletion of keys without freeing occupied space. if so , How can I free this unused space?

È stato utile?

Soluzione

From https://github.com/MSOpenTech/redis/issues/83 "Redis uses the fork() UNIX system API to create a point-in-time snapshot of the data store for storage to disk. This impacts several features on Redis: AOF/RDB backup, master-slave synchronization, and clustering. Windows does not have a fork-like API available, so we have had to simulate this behavior by placing the Redis heap in a memory mapped file that can be shared with a child(quasi-forked) process. By default we set the size of this file to be equal to the size of physical memory. In order to control the size of this file we have added a maxheap flag. See the Redis.Windows.conf file in msvs\setups\documentation (also included with the NuGet and Chocolatey distributions) for details on the usage of this flag. "

Altri suggerimenti

I know this is an old thread, but I am facing the same issues with the file sizes.

In case you have problems with your C ssd drive (like me), you can make a directory junction:

1) Stop redis service
2) Move C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Redis folder to another drive / location.
3) Open a command prompt in C:\Windows\ServiceProfiles\NetworkService\AppData\Local then execute:

mklink /J "C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Redis" "[newpath]"

PD: [newpath] must be absolute, like "D:\directory junctions\Redis"

4) Start redis service. Now the files are in another drive.

Check http://ss64.com/nt/mklink.html if doubts regarding this command.

I faced this same issue on my development machine. It was resolved by stopping the redis service and I used WinDirStat (which is what I used to detect the issue originally) to permanently delete these files in appdata/local/redis.

I then started redis back up and things were working fine.

Before following this same procedure others may want to ensure that this data isn't needed. In my case it wasn't critical since this is my development workstation.

When you flush the DB you only flush the keys from memory. I'm not sure why you've got files of different names, it may be an artifact of the way the Windows port of Redis manages files, but Redis itself doesn't delete files when you remove keys. You will need to manage outdated files outside of Redis.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top