Discussion:
[leveldb] InMemoryEnv
Lucas Lersch
2016-06-22 10:25:46 UTC
Permalink
Hi,

I have noticed that there is an implementation of an In-Memory Environment
in helpers/memenv. Is this supposed to be an alternative to the POSIX
environment, but without durability guarantees?
Is it more like a "prototype" or it is safe to use it?
Finally, what would be the difference between an InMemoryEnv and a POSIX
environment in a tmpfs or ramfs?

Best regards,
Lucas Lersch
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Sanjay Ghemawat' via leveldb
2016-06-22 16:26:53 UTC
Permalink
Post by Lucas Lersch
Hi,
I have noticed that there is an implementation of an In-Memory Environment
in helpers/memenv. Is this supposed to be an alternative to the POSIX
environment, but without durability guarantees?
Yes.
Post by Lucas Lersch
Is it more like a "prototype" or it is safe to use it?
Should be safe. My understanding is that it is used in Chrome/Chromium
(incognito mode?). But I am not 100% sure.
Post by Lucas Lersch
Finally, what would be the difference between an InMemoryEnv and a POSIX
environment in a tmpfs or ramfs?
Some differences I can think of:

(1) tmpfs lifetime is not bound to a process. So a leveldb running against
tmpfs can pick up where it left off after a process restart (assuming
machine hasn't rebooted; tmpfs hasn't been wiped).
(2) My guess is that InMemoryEnv will be a little faster since it requires
no system calls to acces underlying data
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...