girinovey on Nostr: #nostr #relay After 3 days running the relay is using about 2Gb memory, but the saved ...
#nostr #relay
After 3 days running
https://github.com/girino/mem-relay the relay is using about 2Gb memory, but the saved backup file (saved every few minutes) is only 230 Mb. So most of the memory used can be collected by the garbage collector if needed. No need to "clean" old events yet.
An still as fast as ever. with indexes for the most common searches (by id, by author, etc) it takes less than 500 micro seconds on average. Load on the raspberry pi is very low (0.3 to 0.6).
A memory only relay seems to be a reasonable alternative for public relays with low resources.
fiatjaf (npub180c…h6w6) and
utxo the webmaster 🧑💻 (npub1utx…50e8) what do you think?
Published at
2024-10-27 14:48:54Event JSON
{
"id": "206e8b9aa98f5793524f80df692e335073bb863a1bce3a12d5c08e0e8c886d53",
"pubkey": "3ffac3a6c859eaaa8cdddb2c7002a6e10b33efeb92d025b14ead6f8a2d656657",
"created_at": 1730040534,
"kind": 1,
"tags": [
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
],
[
"p",
"e2ccf7cf20403f3f2a4a55b328f0de3be38558a7d5f33632fdaaefc726c1c8eb"
],
[
"t",
"nostr"
],
[
"t",
"relay"
]
],
"content": "#nostr #relay\n\nAfter 3 days running https://github.com/girino/mem-relay the relay is using about 2Gb memory, but the saved backup file (saved every few minutes) is only 230 Mb. So most of the memory used can be collected by the garbage collector if needed. No need to \"clean\" old events yet.\n\nAn still as fast as ever. with indexes for the most common searches (by id, by author, etc) it takes less than 500 micro seconds on average. Load on the raspberry pi is very low (0.3 to 0.6).\n\nA memory only relay seems to be a reasonable alternative for public relays with low resources.\n\n nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 and nostr:npub1utx00neqgqln72j22kej3ux7803c2k986henvvha4thuwfkper4s7r50e8 what do you think?",
"sig": "427ef55284745147843af93ab651d7c390d6771721848078bde22c4b1774529cf8fe7e523cf1d231451cb93a2552d0868679dfac7789f7cda32fd31246d95c20"
}