Do you have multiple real CPU cores?  Multiple fake cores (what intel calls 
hyperthreads)?

When one thread in one process opens a database and runs it takes N seconds -- 
utilizing only one CPU of course.  What is the CPU consumption while the 
process is running?

When you use two processes, each with one thread opening one separate database 
each but it still takes N seconds what is the CPU consumption?

When you use one process with two threads, each with an independent connection 
to independent databases, what is the CPU consumption?

What operating system?


---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org


> -----Original Message-----
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Bob Price
> Sent: Saturday, 22 September, 2012 18:48
> To: sqlite-users@sqlite.org
> Subject: [sqlite] performance of one process using multiple independent
> sqlite databases
> 
> I've been searching through the archive without much luck on this topic, so
> I'll ask my question.  If this has been answered somewhere else please point
> me to that.
> 
> I have a single process that independently opens and uses multiple Sqlite
> databases, each with its own connection.  The data in each database is
> entirely independent of the data in any other database, so I never use the
> ATTACH capability, just open each db separately.
> 
> This all works correctly, but I am having some performance issues.  It
> appears that it might be the case that a write on the connection of one
> database blocks any activity on the connection of the other databases.  Some
> things that led me to this conclusion are tests that show with only a single
> db I can process some data in N seconds, but when I have two threads each
>  talking to their own db, the time jumps to around 2*N seconds,  while if I
> run two test processes each with its own db the time is only a little over
> N.  The host I am using has lots of spare CPU cycles during these tests, and
> I have used normal disks, SSDs, and ram disks, all with synchronous=OFF.
> 
> I have tried THREAD_SAFE=1 and 2, the default journal mode, the WAL journal
> mode, and BEGIN DEFERRED and BEGIN EXCLUSIVE, on Linux and Windows.
> 
> Does this make sense?  Does Sqlite let two connections to different databases
> impact each other?  Of course it could be that I am doing something dumb
> elsewhere, but I have literally spent many days debugging and profiling this
> to no avail.
> 
> Any suggestions or other configurations I might try?
> 
> Any help is appreciated!
> 
> Bob
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to