spacejam/sled

Is sled supposed to use memory comparable to database size itself?

vi opened this issue · 1 comments

vi commented

I get crashes on trying to open a big Sled database on small VPS.

Does using 500 MB of RSS after opening gigabyte database indicate a bug in Sled or is within design expectations?

cache_capacity is set to 1024 * 1024.

vi commented

bytehound showing large allocations here:

#17 sled::config::Config::open [config.rs:360]
#18 sled::db::Db::start_inner [db.rs:54]
#19 sled::context::Context::start [context.rs:33]
#20 sled::pagecache::PageCache::start [mod.rs:541]
#21 sled::pagecache::snapshot::read_snapshot_or_default [snapshot.rs:485]
#22 sled::pagecache::snapshot::advance_snapshot [snapshot.rs:287]
#23 sled::pagecache::snapshot::Snapshot::apply [snapshot.rs:162]

Does it really need 219M?


Also while playing with memory limits, cache_capacity and so on, database got corrupted. It fails when trying to open it:

thread 'main' panicked at 'range end index 95 out of range for slice of length 27', /home/vi/src/sled/src/serialization.rs:135:20