What should I be looking at to figure out why the latency of some of my SpiceDB calls are high? Example attached where a ReadRelationships took > 400ms, but the trace isn't particularly helpful (or maybe I'm not reading it correctly)
v
vroldanbet
03/14/2023, 8:43 AM
you can see there are events in that span, and you'd be able to figure out where time is being spent. I'd bet it's connection pool contention
p
perseus29
03/14/2023, 10:04 AM
hmm. i increased the max number of concurrent connections from 20 to 40, waiting to see if that has a significant impact
v
vroldanbet
03/14/2023, 10:18 AM
connection pool sizes are definitely a source of contention. This is not so much of a problem with something like Spanner because it exposes its API via HTTP2, which allows multiplexing database connections
vroldanbet
03/14/2023, 10:19 AM
please note that the connection pool should be adjusted to what the database can tolerate. Those connections are not free.
p
perseus29
03/14/2023, 10:52 AM
yeah ive been keeping an eye on postgres to see if this has an impact on its resources