home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MJGraf" data-source="post: 1036158" data-attributes="member: 17886"><p>To give you a bit of an example of what problems I face with the ReadTests - most likely due to the windows operating system read cache - I have done some ReadTests now with the current status version of SQLiteDatabase. I've only measured the ReadTimes (not the QueryTimes).</p><p></p><p>The first result I got was this:</p><p><strong>locking_mode=Exclusive / Shared Cache / Page Size 4KB</strong></p><p>ReadTimes:</p><p>ReadTest 1: 13576ms, 11891ms</p><p>ReadTest 2: 330ms, 208ms</p><p>ReadTest 3: 27.7ms, 9.6ms</p><p>ReadTest 4: 844.8ms, 61.5ms</p><p>As you see, this is with shared cache enabled, exclusive locking mode and a page size of 4KB. My first thought was: Damn, now with exclusive locking mode the ImportTest, i.e. write performance, is faster, but the ReadTests are much slower.</p><p></p><p>So I left everything as it was and just set the locking mode to normal. Restarted MP2 Server and these are the results:</p><p><strong>locking_mode=Normal / Shared Cache / Page Size 4KB</strong></p><p>ReadTimes:</p><p>ReadTest 1: 12079ms, 11809ms</p><p>ReadTest 2: 238ms, 208ms</p><p>ReadTest 3: 15.4ms, 9.9ms</p><p>ReadTest 4: 117.5ms, 42.1ms</p><p>In particular the first pass of ReadTest 2 and ReadTest4 made me think that my suspicion was right - exclusive locking mode is slower than normal locking mode. But then again I couldn't believe this because everyone in various forums says, exclusive mode is faster. So again I didn't change anything but setting exclusive locking mode, restarted MP2 server and did exactly the same test again. Results as follows:</p><p></p><p><strong>locking_mode=Exclusive / Shared Cache / Page Size 4KB</strong></p><p>ReadTimes:</p><p>ReadTest 1: 12110ms, 11736ms</p><p>ReadTest 2: 243ms, 236ms</p><p>ReadTest 3: 24.4ms, 12.8ms</p><p>ReadTest 4: 117.5ms, 37.2</p><p>Now all of a sudden, locking mode exclusive was about as fast as normal locking mode - maybe just a bit slower in ReadTest 3.</p><p></p><p>This time I left everything as it was, locking mode still exclusive. Restarted MP2 Server and just did the test again:</p><p><strong>locking_mode=Exclusive / Shared Cache / Page Size 4KB</strong></p><p>ReadTimes:</p><p>ReadTest 1: 12208ms, 11647ms</p><p>ReadTest 2: 237ms, 218ms</p><p>ReadTest 3: 15.7ms, 10.2ms</p><p>ReadTest 4: 122.8ms, 45.7ms</p><p>Now all the ReadTests - including ReadTest 3 - were about as fast as with normal locking mode.</p><p></p><p>Once again no changes, a restart of MP2 Server and the same test again:</p><p><strong>locking_mode=Exclusive / Shared Cache / Page Size 4KB</strong></p><p>ReadTimes:</p><p>ReadTest 1: 12191ms, 11761ms</p><p>ReadTest 2: 259ms, 207ms</p><p>ReadTest 3: 18.9ms, 9.8ms</p><p>ReadTest 4: 114.7ms, 43.8ms</p><p>Roughly the same results as with the last test...</p><p></p><p>Now the conclusion of all this is that probably the windows OS read cache makes the test results somehow unpredictable. After a certain number of times that I repeat the same tests (with a restart of MP2 Server between the tests, so the SQLite inbuilt cache is definitely empty) it seems that we get more or less reliable results, but I don't know after what number of repeats - and so I would have to guess whether a result was caused by my optimizations or by the respective parts of the database file being in windows read cache.</p><p></p><p>So while under normal using conditions there is of course also the windows OS cache, which makes MP2 Server faster. But that doesn't help for testing and improving SQLiteDatabase. As I already mentioned above, I saw a tool somewhere in the internet, which is able to clear the windows read cache. I will try to find that again and then see whether I get consistent results...</p></blockquote><p></p>
[QUOTE="MJGraf, post: 1036158, member: 17886"] To give you a bit of an example of what problems I face with the ReadTests - most likely due to the windows operating system read cache - I have done some ReadTests now with the current status version of SQLiteDatabase. I've only measured the ReadTimes (not the QueryTimes). The first result I got was this: [B]locking_mode=Exclusive / Shared Cache / Page Size 4KB[/B] ReadTimes: ReadTest 1: 13576ms, 11891ms ReadTest 2: 330ms, 208ms ReadTest 3: 27.7ms, 9.6ms ReadTest 4: 844.8ms, 61.5ms As you see, this is with shared cache enabled, exclusive locking mode and a page size of 4KB. My first thought was: Damn, now with exclusive locking mode the ImportTest, i.e. write performance, is faster, but the ReadTests are much slower. So I left everything as it was and just set the locking mode to normal. Restarted MP2 Server and these are the results: [B]locking_mode=Normal / Shared Cache / Page Size 4KB[/B] ReadTimes: ReadTest 1: 12079ms, 11809ms ReadTest 2: 238ms, 208ms ReadTest 3: 15.4ms, 9.9ms ReadTest 4: 117.5ms, 42.1ms In particular the first pass of ReadTest 2 and ReadTest4 made me think that my suspicion was right - exclusive locking mode is slower than normal locking mode. But then again I couldn't believe this because everyone in various forums says, exclusive mode is faster. So again I didn't change anything but setting exclusive locking mode, restarted MP2 server and did exactly the same test again. Results as follows: [B]locking_mode=Exclusive / Shared Cache / Page Size 4KB[/B] ReadTimes: ReadTest 1: 12110ms, 11736ms ReadTest 2: 243ms, 236ms ReadTest 3: 24.4ms, 12.8ms ReadTest 4: 117.5ms, 37.2 Now all of a sudden, locking mode exclusive was about as fast as normal locking mode - maybe just a bit slower in ReadTest 3. This time I left everything as it was, locking mode still exclusive. Restarted MP2 Server and just did the test again: [B]locking_mode=Exclusive / Shared Cache / Page Size 4KB[/B] ReadTimes: ReadTest 1: 12208ms, 11647ms ReadTest 2: 237ms, 218ms ReadTest 3: 15.7ms, 10.2ms ReadTest 4: 122.8ms, 45.7ms Now all the ReadTests - including ReadTest 3 - were about as fast as with normal locking mode. Once again no changes, a restart of MP2 Server and the same test again: [B]locking_mode=Exclusive / Shared Cache / Page Size 4KB[/B] ReadTimes: ReadTest 1: 12191ms, 11761ms ReadTest 2: 259ms, 207ms ReadTest 3: 18.9ms, 9.8ms ReadTest 4: 114.7ms, 43.8ms Roughly the same results as with the last test... Now the conclusion of all this is that probably the windows OS read cache makes the test results somehow unpredictable. After a certain number of times that I repeat the same tests (with a restart of MP2 Server between the tests, so the SQLite inbuilt cache is definitely empty) it seems that we get more or less reliable results, but I don't know after what number of repeats - and so I would have to guess whether a result was caused by my optimizations or by the respective parts of the database file being in windows read cache. So while under normal using conditions there is of course also the windows OS cache, which makes MP2 Server faster. But that doesn't help for testing and improving SQLiteDatabase. As I already mentioned above, I saw a tool somewhere in the internet, which is able to clear the windows read cache. I will try to find that again and then see whether I get consistent results... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
Top
Bottom