What is Nostr?
The Real Grunfink /
npub1p77…0jxq
2025-02-22 06:50:03
in reply to nevent1q…yjy4

The Real Grunfink on Nostr: Hi. You're right: the first fifo size number (cur[rent]) will be counting down until ...

Hi. You're right: the first fifo size number (cur[rent]) will be counting down until all outgoing messages are sent. The peak is just gossip about how long this queue has been.

Basically, all threads work in the same way. There are four states: stopped, waiting, input or output. It's almost impossible to see the first one, as it's only set while initializing or shutting down; input is also seen rarely, unless the instance posting the data is specially slow. So they are usually waiting except while in the «send storm», when they are mostly in output mode. Anyway, even in this case, an incoming message has preference over everything, and the first available thread will serve it.

#snac sets up as many threads as cores are available, but being that the thread work is basically network I/O bound (there is very few CPU work to be done), you can increase the number of threads to twice or more the number of cores and performance will be slightly improved.

Interesting photo!

Author Public Key
npub1p77whr3cyukyulgej4qxyeee6gjxexumj4lsh9a40x0q4g5t72sqzq0jxq