D. Richard Hipp wrote:
Bob Gilson wrote:
We believe the disk writes are caused by fcntl(). Its updates to the bits on the file can be has resource consuming as an fsync() or write().
fcntl(F_RDLCK) and fcntl(F_UNLCK) should be adjusting some data structures inside the kernel only. Those calls should *never* modify the disk. What OS are you running?
[EMAIL PROTECTED]:~$ uname -a Linux dustpuppy 2.6.9.pgm #1 Wed Dec 29 09:00:24 MST 2004 i686 GNU/Linux
So if fcntl() just modifies kernel structs and access() and fstat64() should only be doing reads, do you know what is doing the disk writes? And why they don't occur when "PRAGMA default_synchronous = OFF" is set?
Also, we can't understand why each select statement has access() and fstat64() calls for each select.
These are to check to see if another process has modified the database since you last read it. They also check to see if another process was in the middle of modifying the database but crashed and thus the partially completed changes need to be rolled back.
Our app, a daemon, is guaranteeing that no other process is touching the database. In deployment, the next read from the database will occur less than 10 ms later. Couldn't the checks for rollbacks be done only when the database is opened?
Thanks, Bob