My app used full text search in sqlite. On my local machine the query takes about 1.5 seconds to return.
When I run the same thing on a fly shared x2 machine it takes 9 seconds.
When i connect with ssh and run top I cant see anything jumping out at me, apart from it never seems to use more than about 50% of one of the 2 cores. On my local machine it uses 100% of one core as I don’t believe sqlite is multithreaded.
The IO% is very low too.
I initially thought it was litefs related, but I moved it on to a volume and it didnt make any difference.
The App is written in Go and is in an alpine image.
Does anyone have any ideas?
Tried changing the RAM didnt seem to make any difference. Moved to a performance machine with 1 core and 2Gb and it now runs in 2 seconds. And can use 100% of the CPU.
Hmm, that’s interesting. I originally suspected the increase in RAM would help because the database would be populated in the OS page cache and that’s significantly faster than fetching over FUSE.
Do you see the same experience if you run your query from the sqlite3 CLI instead of your Go app?