BLUE
Profile banner
J
Jaz
@jaz.bsky.social
Jaz Gender Nomad IRC made me gay Backend (Go) @ Bsky Does musical things and computer things 27. they/them 🏳️‍⚧️ BSky Stats- bsky.jazco.dev/stats github.com/ericvolp12
13k followers262 following4.8k posts
Jjaz.bsky.social

The current public Jetstream instance has been running with `zstd` compression support for ~14 hours now, checking in on performance. The instance supports ~12 consumers right now with varying filters, but that fluctuates throughout the day. All consumers are currently caught up with live.

Grafana screenshot of the Jetstream dash showing consumer throughput, CPU utilization, RAM utilization, disk and network util.

CPU is sitting under 200ms/sec of util, RAM is floating around 100MiB, disk is around 14GiB, and net is using 12.5mbps down and 5.5mbps up.
5

VVvladimir.varank.in

Curious, if you compared zstd against other options? Go's native zstd is "famous" to be less optimal, comparing to its C implementation. Could S2 (aka "better snappy") provide different trade-off for resource usage/speed?

0

Weismann Score?

0
Jjaz.bsky.social

Looking at a CPU profile, we can see half the total CPU (~0.18 cores) is being consumed by the ZSTD encoding process which encodes each message once for storage/broadcast and the Relay firehose consumer. Serving to subscribers is using less than 0.09 CPU cores, most of that time being syscalls

pprof profile of CPU time spent by Jetstream
2
KSmackuba.eu

So the CPU usage for the compression is acceptable now? What did you tweak there in general to make it not-insane (ELI12 :)?

1
martani.bsky.social

Great work!

0
Profile banner
J
Jaz
@jaz.bsky.social
Jaz Gender Nomad IRC made me gay Backend (Go) @ Bsky Does musical things and computer things 27. they/them 🏳️‍⚧️ BSky Stats- bsky.jazco.dev/stats github.com/ericvolp12
13k followers262 following4.8k posts