0

Using a test script with test data, the average time to complete an insert, with SQLite3, is about 10ms.

But about 3% of the time I do an insert it takes between 1 and 3 seconds to complete.

I'm running a fairly recent build of Raspbian from a few months ago and SQLite 3.8.4.

The process doing the inserts jumps from about 5% CPU usage to 10% when the slow inserts happen, but otherwise the CPU usage is normal.

Any ideas?

  • What class is your SD card? I suspect your issue might be I/O. – PhillyNJ Aug 21 '14 at 12:34
  • It's a class 10 SD card. – Seth Archer Brown Aug 21 '14 at 16:44
  • Try storing the db in a RAM filesystem instead of the SD-card and run the test again. Any difference? – Ronny Nilsson Aug 21 '14 at 19:12
  • Yeah, I just thought of doing that earlier. It fixes the issue, so now I at least know that it's a problem with writing to the SD card itself. I'm going to try a few different SD cards to see if it's any different. – Seth Archer Brown Aug 22 '14 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.