2

I'm looking for a data store that is very memory efficient while still allowing many object changes per second and disregarding ACID compliance for the last X records.

I need this database for a server with not much memory and I can make a key-value store, document, or SQL database work.

The idea is that indexes/keys are the only thing I need in memory and all the actual values/objects/rows can be saved on disk do to the low read rate (I just want index/key lookup to be fast). I also don't want records constantly being flushed to disk, so I would like the last X number of records to be held in memory so that 100 or so of them can all be written at once. I don't care if I lose the last 10 seconds worth of objects/values. I do care if the database as a whole is in danger of becoming corrupt.

Is there a data-store like this?

1
  • This sounds like memcached, but I'm not that familiar with it so I'll let someone else confirm Jul 2, 2011 at 22:44

3 Answers 3

2
+50

Redis can handle this situation -- it writes everything to disk (eventually), but you can specify how frequently it does this, and anything not written is (naturally) lost.

http://redis.io/topics/persistence gives you all the gory details.

3
  • The problem is that Redis requires the data to be stored in RAM also (or swap space). You cannot have a Redis database with more memory than RAM + Swap. It's the same problem that memcached has. I can't fit 2GB of data in a membase or redis database on a 256MB VPS.
    – Xeoncross
    Jul 8, 2011 at 17:09
  • Hmm, I misinterpreted your question then.
    – womble
    Jul 8, 2011 at 22:53
  • Redis comes the closest. If only they didn't keep the data in memory.
    – Xeoncross
    Jul 9, 2011 at 1:38
1

Yes - any database using asynchronous I/O on a modern operating system will have near optimal caching.

1

Redis has already been mentioned

Other options:

  • scalaris (somewhere on code.google.com) -- the complete CAP and is distributed
  • riak (basho.com -- eventually consistent, distributed)
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .