redb icon indicating copy to clipboard operation
redb copied to clipboard

[Questions] Usage

Open The-Mr-L opened this issue 2 years ago • 3 comments

hi :) first of thank you for sharing, it is great.

So, what I understand from reading the issue tracker is that it should be supported to have the db resize itself if out of space right? but how do you enable it? I get out of space errors in my tests. I just init the db with 1MB as the db_size but it seems to be fixed max size or what?

  1. Are you using this in some projects of your own at this point, or is it still a no go ;)

  2. more general question how well would a kv store like this be for image storage for example to backup images would I gain some speed using a higher page size compared to to just using the os filesystem. I just wonder if it would make backup lots of images go faster. Like in this way there is potential fever system calls or am I completely wrong?

thanks again

The-Mr-L avatar Oct 19 '22 14:10 The-Mr-L

Ah yes, that's the maximum size. So you should set that to the max size you want, and it will start out at a much smaller size and grow dynamically.

  1. it's still very beta, but yes I'm using it in one project: https://github.com/fleetfs/fleetfs
  2. it shouldn't matter very much, but if you really care about performance you may want to try a larger size and benchmark it. The testing I've done shows that there is at most a 20% difference or so

cberner avatar Oct 20 '22 04:10 cberner

when I do set the db_sze to 10GB then it creates a 10GB empty file, is that expected? I am on windows 10 64bit

The-Mr-L avatar Oct 20 '22 16:10 The-Mr-L

Ah, unfortunately dynamic growth is not supported on Windows. The person who contributed the Windows support explained a bit about why it is difficult: https://github.com/cberner/redb/pull/369

cberner avatar Oct 21 '22 00:10 cberner

gotya, thank you :)

The-Mr-L avatar Oct 21 '22 10:10 The-Mr-L