girinovey on Nostr: about 800Mb memory in 20h - 7ms on average for each full scan - lookups by ID take 14 ...
about 800Mb memory in 20h
- 7ms on average for each full scan
- lookups by ID take 14 micro secs
- lookups by kind and author (the most common) taking 18 microseconds
(used simple maps for the indexes)
load on the raspberry pi is not even close to what it gets when using badger or lmdb (about 0.2 with albyhub being responsible for most of the cpu usage, not the relay).
Just doesnt seem to be able to hold more than a few days data. growing too fast. I'll keep you posted.
(data is saved to disk in json format every 3 minutes, takes 2.5 seconds to save).
Seems running everything im memory is really fast and less resource consuming, but needs lots of RAM :(
code:
https://github.com/girino/mem-relay (still full of legacy code all around, since i copied it from another project, only important thing is "slicestore" folder)
#nostr #relay #khatru #memonly #slicestore
Published at
2024-10-25 12:12:49Event JSON
{
"id": "4e8b0af1c31ca3a33712beedc99d8f6b3e2ce333951e157554409c1cb055bbc2",
"pubkey": "3ffac3a6c859eaaa8cdddb2c7002a6e10b33efeb92d025b14ead6f8a2d656657",
"created_at": 1729858369,
"kind": 1,
"tags": [
[
"t",
"nostr"
],
[
"t",
"relay"
],
[
"t",
"khatru"
],
[
"t",
"memonly"
],
[
"t",
"slicestore"
]
],
"content": "about 800Mb memory in 20h\n\n- 7ms on average for each full scan\n- lookups by ID take 14 micro secs\n- lookups by kind and author (the most common) taking 18 microseconds\n\n(used simple maps for the indexes)\n\nload on the raspberry pi is not even close to what it gets when using badger or lmdb (about 0.2 with albyhub being responsible for most of the cpu usage, not the relay).\n\nJust doesnt seem to be able to hold more than a few days data. growing too fast. I'll keep you posted.\n\n(data is saved to disk in json format every 3 minutes, takes 2.5 seconds to save).\n\nSeems running everything im memory is really fast and less resource consuming, but needs lots of RAM :(\n\ncode: https://github.com/girino/mem-relay (still full of legacy code all around, since i copied it from another project, only important thing is \"slicestore\" folder)\n\n#nostr #relay #khatru #memonly #slicestore\n\nhttps://nostrcheck.me/media/3ffac3a6c859eaaa8cdddb2c7002a6e10b33efeb92d025b14ead6f8a2d656657/e76389a65b8221e4956aa8bb1cacc8526e23f20156bc9d205ed0450a09b7d2fb.webp",
"sig": "e069808c74afc2dc8559eaf13baf3906dd431cfa25b79f1e9d5d00446717ca87a4f787a434de8eca3ccfcd15916af615a069e1eb17dc9d7616afcb19aa024e02"
}