Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Enable Shared-Cache Mode for opened database #581

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Aug 7, 2023

  1. Enable Shared-Cache Mode for opened database

    According to documentation this mode can increase database
    performance: https://www.sqlite.org/sharedcache.html
    
    My tests showed improvement both when using 1 client
    and 100 clients.
    
    For sigle client the throughput increased by 14%.
    For 100 clients the throughput increased by 27%.
    On the same time latencies have been lowered.
    
    The results for sqld running locally:
    
    1 client with no sharedcache:
        Summary:
            Total:        60.0012 secs
            Slowest:      0.0221 secs
            Fastest:      0.0009 secs
            Average:      0.0011 secs
            Requests/sec: 895.4821
    
        Latency distribution:
            10% in 0.0009 secs
            25% in 0.0010 secs
            50% in 0.0011 secs
            75% in 0.0012 secs
            90% in 0.0013 secs
            95% in 0.0014 secs
            99% in 0.0018 secs
    
    1 client with sharedcache:
        Summary:
            Total:        60.0008 secs
            Slowest:      0.0187 secs
            Fastest:      0.0008 secs
            Average:      0.0010 secs
            Requests/sec: 1042.3534
        Latency distribution:
            10% in 0.0008 secs
            25% in 0.0009 secs
            50% in 0.0009 secs
            75% in 0.0010 secs
            90% in 0.0011 secs
            95% in 0.0012 secs
            99% in 0.0016 secs
    
    100 clients with no sharedcache:
        Summary:
            Total:        60.0359 secs
            Slowest:      0.0962 secs
            Fastest:      0.0103 secs
            Average:      0.0368 secs
            Requests/sec: 2716.9230
        Latency distribution:
            10% in 0.0311 secs
            25% in 0.0338 secs
            50% in 0.0368 secs
            75% in 0.0396 secs
            90% in 0.0422 secs
            95% in 0.0439 secs
            99% in 0.0480 secs
    
    100 clients with sharedcache:
        Summary:
            Total:        60.0218 secs
            Slowest:      0.0828 secs
            Fastest:      0.0075 secs
            Average:      0.0267 secs
            Requests/sec: 3744.2703
        Latency distribution:
            10% in 0.0225 secs
            25% in 0.0242 secs
            50% in 0.0262 secs
            75% in 0.0287 secs
            90% in 0.0314 secs
            95% in 0.0332 secs
            99% in 0.0377 secs
    
    Signed-off-by: Piotr Jastrzebski <[email protected]>
    haaawk committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    cf17b62 View commit details
    Browse the repository at this point in the history