girinovey on Nostr: final benchmark, using an nvme SSD, and including badger: badger is 2 times slower ...
final benchmark, using an nvme SSD, and including badger:
badger is 2 times slower than lmdb on queries, but orders of magnitude faster on stores (27s for badger and 16 minutes for lmdb).
slicestore is still an order of magnitude faster on stores than badger. Performance gains of using slice store range from 2 to 8 times over lmdb, and 10 to 24 times over badger.
My preliminary conclusion:
- memory only is a good solution for restricted environments, specially with slow disks.
- badger should be a better choice for public relays, or relays that "copy" data from upstream relays, since storage cost is lower than in lmdb.
- lmdb is best for personal relays with few writes, but a lot of reads. though i'd use badger on those too.
Published at
2024-10-27 22:49:44Event JSON
{
"id": "4d133738dbc8ae2998729a82028ad68296531dcc0029efa93acf817d44e0bbee",
"pubkey": "3ffac3a6c859eaaa8cdddb2c7002a6e10b33efeb92d025b14ead6f8a2d656657",
"created_at": 1730069384,
"kind": 1,
"tags": [
[
"e",
"206e8b9aa98f5793524f80df692e335073bb863a1bce3a12d5c08e0e8c886d53",
"wss://nostr.girino.org/",
"root"
],
[
"e",
"32aa9ea6b27b9a0cedd848cbef2274189194db5018e9e031f15fe71dbba68127",
"",
"reply"
],
[
"p",
"3ffac3a6c859eaaa8cdddb2c7002a6e10b33efeb92d025b14ead6f8a2d656657"
],
[
"p",
"e2ccf7cf20403f3f2a4a55b328f0de3be38558a7d5f33632fdaaefc726c1c8eb"
]
],
"content": "final benchmark, using an nvme SSD, and including badger:\n\nbadger is 2 times slower than lmdb on queries, but orders of magnitude faster on stores (27s for badger and 16 minutes for lmdb).\n\nslicestore is still an order of magnitude faster on stores than badger. Performance gains of using slice store range from 2 to 8 times over lmdb, and 10 to 24 times over badger.\n\nMy preliminary conclusion:\n- memory only is a good solution for restricted environments, specially with slow disks. \n- badger should be a better choice for public relays, or relays that \"copy\" data from upstream relays, since storage cost is lower than in lmdb. \n- lmdb is best for personal relays with few writes, but a lot of reads. though i'd use badger on those too.\n\n\nhttps://nostrcheck.me/media/3ffac3a6c859eaaa8cdddb2c7002a6e10b33efeb92d025b14ead6f8a2d656657/e92a107ecf8dd83d81820ea2dee87a9045abb2d89274c26ff3dc33998401470a.webp",
"sig": "a6b429043488dcb5966431c00e569b7d642f0526e786a5a10d5fef209570af7c3cc48cda947ec62a20efa5fa869e209ea7db703c5ece2f4826b90d9f33a1ab7f"
}