Skip to content

create SQLite database in WAL mode by default #10279

Closed

Description

Although SQLite databases are not recommended for ownCloud installations many people use it for its ease of administration.

In order to get a little performance boost for this type of database PRAGMA journal_mode should be set to WAL instead of DELETE.

Users can do it manually after the database has been created but it would be nice to have WAL mode set by default.

Activity

  1. guruz commented on Oct 28, 2014

    @guruz
    Contributor

    I only searched for sqlite3 so I did not see that this request is already here.
    Posted a dup at #11824

  2. guruz commented on Oct 28, 2014

    @guruz
    Contributor

    Cloning my comment:

    With the 1.7 sync client, we have switched the sqlite3 mode for .csync_journal.db to WAL. (See https://www.sqlite.org/wal.html)

    WAL is significantly faster in most scenarios.
    WAL provides more concurrency as readers do not block writers and a writer does not block readers. Reading and writing can proceed concurrently.
    Disk I/O operations tends to be more sequential using WAL.
    WAL uses many fewer fsync() operations and is thus less vulnerable to problems on systems where the fsync() system call is broken.

    I'm wondering if this makes sense for the server to offer sqlite3 with WAL as another option, given the problems I've seen here on the issue tracker regarding performance and locking.

    The only disadvantage that I see is that it does not work on a network file system. Is that a possible issue? (although if you EXCLUSIVE locking mode, it will also work on a network fs)
    It also creates two additional owncloud.db-wal and owncloud.db-shm files. The shm is shared memory, is that supported for all servers?

  3. DeepDiver1975 commented on Mar 21, 2015

    @DeepDiver1975
    Contributor

    fixed in 8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions