On 21/02/17 10:22, Kevin O'Gorman wrote: > Some of my stuff takes a while to run, and I like to keep tabs on it. > Right now, I'm running one of those, and the Linux top command shows > extremely small CPU usage, and a status ("S" column) of "D" which the man > page defines as "uninterruptable sleep". Huh?
In this case you can read D as waiting on disk. Unless you are using multithreading, each query that needs to get data not already in cache will result in disk activity. And the code will not continue until it gets the data from the disk. The waiting is why CPU usage is low. You can use multithreading to allow more concurrent disk I/O although Python's GIL complicates matters. You can also tune the caches used by SQLite. If your database is smaller than your RAM then you can prepopulate the OS cache with the database file contents. Roger
signature.asc
Description: OpenPGP digital signature
_______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users