I'll try the synchronous=off the next time I run it. As it happens, this one finished in 57 minutes, which is not bad, considering.
But, I wonder, could i not tell if it's doing lots of commits by looking at the size of the ?.db-journal file? It gets pretty large. On Tue, Feb 21, 2017 at 10:38 AM, Richard Hipp <d...@sqlite.org> wrote: > On 2/21/17, Kevin O'Gorman <kevinogorm...@gmail.com> wrote: > > I'm not at all sure this is the right place to ask, but as it only comes > up > > when I'm running one of > > my sqlite jobs, I thought I'd start here. I'm running Python 3.5 scripts > > in Linux 16.04.1 using the sqlite3 package. Machine is Core i5, 32GB > RAM. > > > > 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? > > My guess: It is busying doing an fsync() after a transaction commit. > To find out, temporarily set "PRAGMA synchronous=off" in your script > and see if that makes the pauses go away. > > A better long-term solution would be: > > (1) Group multiple changes into a single transaction using BEGIN...COMMIT. > (2) Set PRAGMA journal_mode=WAL with PRAGMA synchronous=NORMAL. > > > > > > My code does not use an intentional sleep at all. It's traversing parts > of > > a graph, and not interacting with anything else. As far as I know, > anyway, > > and I wrote the whole thing. > > > > Now it's true that it's updating the consequences of changes to graph > nodes > > that took about 3 hours just to install, so taking a while is not a > > surprise by itself. I just wonder what that status means and how it > could > > arise. > > > > -- > > word of the year: *kakistocracy* > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@mailinglists.sqlite.org > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- word of the year: *kakistocracy* _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users