Replies: 5 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
I actually tried fsyncdata now on fjall: This is my system. System:
Kernel: 6.9.10-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
clocksource: tsc avail: hpet,acpi_pm parameters: initrd=\initramfs-linux.img
root=LABEL=OSRoot rootfstype=bcachefs rootflags=relatime rw
pcie_aspm.policy=powersupersave transparent_hugepage=madvise nowatchdog
loglevel=4 resume=LABEL=Swap amd_pstate=guided zswap.enabled=1
zswap.compressor=zstd zswap.max_pool_percent=20 zswap.zpool=z3fold
Desktop: Hyprland v: N/A tools: swayidle avail: swaylock dm: SDDM
Distro: Arch Linux |
Beta Was this translation helpful? Give feedback.
-
What output do you get when running: fn main() {
{
let path = std::path::Path::new("./my_db.redb");
if path.exists() {
std::fs::remove_file(path).unwrap();
}
const TABLE: redb::TableDefinition<&str, &str> = redb::TableDefinition::new("my_data");
let db = redb::Database::create(path).unwrap();
for _ in 0..5 {
let start = std::time::Instant::now();
{
let mut write_txn = db.begin_write().unwrap();
write_txn.set_durability(redb::Durability::Immediate);
{
let mut table = write_txn.open_table(TABLE).unwrap();
for i in 0..1_000_000 {
let v = format!("test{i}");
table.insert(v.as_str(), v.as_str()).unwrap();
}
}
write_txn.commit().unwrap();
}
eprintln!("redb: {:?}", start.elapsed());
}
}
{
let path = std::path::Path::new("./fjall");
if path.exists() {
std::fs::remove_dir_all(path).unwrap();
}
let keyspace = fjall::Config::new(path).open_transactional().unwrap();
let table = keyspace
.open_partition("table", Default::default())
.unwrap();
for _ in 0..5 {
let start = std::time::Instant::now();
{
let mut write_txn = keyspace.write_tx();
for i in 0..1_000_000 {
let v = format!("test{i}");
write_txn.insert(&table, &v, &v);
}
write_txn.commit().unwrap();
}
keyspace.persist(fjall::PersistMode::SyncAll).unwrap();
eprintln!("fjall: {:?}", start.elapsed());
}
}
} On two different SSDs I get:
and on an HDD I get:
|
Beta Was this translation helpful? Give feedback.
-
I will however use fjall in a tokio context, so this is quite bothersome using tokio::task::spawn_blocking. |
Beta Was this translation helpful? Give feedback.
-
I found that 2.0 degraded the sync write performance (but only on certain disks??), I think 9cf22eb should deal with that... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am testing the creation and opening of the database, inserting 1_000_000 keys and values.
Is this expected comparing to redb?
git repo
Clone
I open the database, run the same function twice for redb and fjall to get a grip on creation and reopening of the database.
For fjall, I use
PersisMode::SyncAll
.For redb, I use Durability
redb::Durability::Immediate
.Beta Was this translation helpful? Give feedback.
All reactions