Re: [sqlite] WAL index in memory - multiple connections

2010-12-15 Thread Yoni Londner
> While I'm not a SQLite developer, I have to say I think you're going > down the wrong path. Are you sure the WAL index is your bottleneck? > I think it is unlikely. I think you are right, and I stooped working on this issue. > From your previous descriptions of your application, you might be

Re: [sqlite] WAL index in memory - multiple connections

2010-12-15 Thread Christian Smith
On Mon, Dec 13, 2010 at 12:29:20PM +0200, Yoni Londner wrote: > Hi, > > In general I think that SQLite should have a in memory VFS, which is OS > independent. A laudable goal, where mmap is not available. > > I am going to implement proc_exclusive now, and would love to get any >

Re: [sqlite] WAL index in memory - multiple connections

2010-12-13 Thread Yoni Londner
Hi, As I said, I think that SQLite should perform at the best, for each system architecture (single process single thread, single process multithread, multi process single thread and multi process multithread). I don't think that one architecture limitations should affect the others. So, I did

Re: [sqlite] WAL index in memory - multiple connections

2010-12-12 Thread Yoni Londner
Hi, since in memory index file is already implemented (WAL_HEAPMEMORY_MODE), I think that adding locks when needed will add the support for single process multithreaded programs. Am I wrong? Yoni. On 10/12/2010 5:32 PM, Pavel Ivanov wrote: >> Perhaps using async VFS mode would better suit

Re: [sqlite] WAL index in memory - multiple connections

2010-12-12 Thread Yoni Londner
Hi, > Such application needs custom VFS designed specifically for its needs I Believe that a good library should be as robust as possible, and SQLite is very good at being robust. This is the reason you can find SQLite almost anywhere, from mobile devices, desktop applications and web sites.

Re: [sqlite] WAL index in memory - multiple connections

2010-12-10 Thread Pavel Ivanov
> Perhaps using async VFS mode would better suit Yoni's application? > > http://www.sqlite.org/asyncvfs.html >From my experience asyncVFS is not suitable for applications with high throughput expecting high performance, because with big load and big writeback queue asyncVFS consumes a lot of CPU

Re: [sqlite] WAL index in memory - multiple connections

2010-12-10 Thread Christian Smith
On Fri, Dec 10, 2010 at 09:49:46AM -0500, Pavel Ivanov wrote: > > Given that the WAL index is mmap'ed, you're unlikely to see improvement > > in performance by storing it in heap memory. Reads/writes will go at > > main memory speeds once mapped into your address space, and under memory > >

Re: [sqlite] WAL index in memory - multiple connections

2010-12-10 Thread Pavel Ivanov
> Given that the WAL index is mmap'ed, you're unlikely to see improvement > in performance by storing it in heap memory. Reads/writes will go at > main memory speeds once mapped into your address space, and under memory > pressure, it will be no slower than if the heap was pushed to the swapfile.

Re: [sqlite] WAL index in memory - multiple connections

2010-12-10 Thread Christian Smith
On Thu, Dec 09, 2010 at 12:17:34PM +0200, Yoni Londner wrote: > > > The alternative is to create your own VFS that stores the WAL index in > > heap memory. > I guess I have to do it, but I think this should be available in sqlite, > since it is a common case to use sqlite from single process

Re: [sqlite] WAL index in memory - multiple connections

2010-12-09 Thread Yoni Londner
Hi, Thanks for the quick answer. > Presumably each thread has its own db handle. True. > You could enable shared-cache mode (although that gives you table-level > locking, not the MVCC WAL provides). That is not good enough for me, since I want to run checkpoint in a background thread, while

Re: [sqlite] WAL index in memory - multiple connections

2010-12-09 Thread Dan Kennedy
On 12/09/2010 04:08 PM, Yoni Londner wrote: > Hi, > > I want to use the feature that enable WAL to use heap memory instead of > shared memory for WAL index. > Using locking_mode=exclusive is not good enough option, since I want to > access the DB from two threads, and with locking_mode=exclusive I

[sqlite] WAL index in memory - multiple connections

2010-12-09 Thread Yoni Londner
Hi, I want to use the feature that enable WAL to use heap memory instead of shared memory for WAL index. Using locking_mode=exclusive is not good enough option, since I want to access the DB from two threads, and with locking_mode=exclusive I get "database is locked" error. How can I use in