cache hit ratio for the deployed synapse-media-proxy over the last two days isn't great :/ like 30% and going down to 26.5% now :(

other than that, synapse-media-proxy seems to work well, nice and stable and memory use is pretty great too, even with all the thumbnailing.

Turns out most of the requests are thumbnails of media from other servers, which makes sense because that's how they appear in the timeline, only hitting /download when you click to see full res

stats.pixie.town/d/rPBvoh6Gk/s

and I've heard 0 complaints and some people probably didn't even notice the deployment :D

except that my server discovery code *did* have a bug in certain server configurations so failed to fetch media from those...
should be an easy fix today, and due to the drop-in nature it was incredibly easy to temporarily disable the media proxy

@f0x Do you think the cache hit rate is low because the majority of requests are for never-before-seen content? or because of something else ?

Does the proxy shield your synapse from having to go and fetch thumbnails or images from other servers? i.e. the proxy "federates" with the other servers directly?

I already read the ReadMe and I was slightly confused, I think adding a diagram or definitions of the terms you are using would help.

@f0x FWIW this question is based on an almost-zero understanding of how matrix works lol.

@forestjohnson yeah, I think pixie.town's users are in a rather diverse set of rooms, so media tends to get accessed only a few times

synapse's own media API is *only* used to fetch local content when it's no longer in the RAM cache (shown as 'synapse' in the top right gauges)

All other requests are handled by the proxy, which directly contacts federating servers (remote)

A graph would be good yeah, when I have some more time

stats.pixie.town/d/rPBvoh6Gk/s

@f0x ok I think get it, so there are two different kinds of cache-misses, the ones where it has to talk to your synapse (content that was posted on your server) aka "synapse" in your grafana dashboard.

Then there are the ones where it has to talk to other matrix servers (i'm assuming those are the ones labeled "remote" in your grafana dashboard).

So it looks like most of the time it's talking to remote servers, not yours -- "synapse" is only like 10% of requests. Isn't that a big win then? 90% bandwidth load reduction for the synapse server?

@f0x 90% load reduction sounds a lot cooler than 26.4% load reduction. Gotta look on the bright side lol 😀

@forestjohnson actually yeah, that's a big difference hah, I should add a gauge for that :)

@f0x It might be illuminating to collect a metric for "cache misses caused by previous cache evictions". You would just have to store the cache keys for longer than the actual cache entries, or something.

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.