How to diagnose erratic SQLite3 performance

97 Views Asked by At

I am using SQLite3 from Go on a Jetson NX running Ubuntu 18.04. The performance appears to be very erratic. A query that takes a few ms most of the time can sometimes take upwards of 10 sec. top does not show any CPU spikes at these times. iotop does not show any changes in disk I/O either upward or downward for the 10 sec around a slow transaction. The slow queries might be reads or writes, it is mostly seen with write but we do a lot more writes. We have 4 open connections on the database, but there is no correlation with concurrent access and the slow reads, often three of the connections are sitting unused at the offending times.

Can anyone suggest what tools I should be looking at to help track down the issue?

Note I am not asking about generally improving SQLite performance. I suspect this is some sort of locking or contention issue, but I have no idea on what.

0

There are 0 best solutions below