Skip to content

Disable caching for external storage (performance) #9701

Closed

Description

@macmacy

Hi,
Is it possible to disable caching files for external, read-only storage?

For better understanding why anybody may need this, here is my usage scenario:

I have FreeNAS box with large volume used as file-server.
I wanted to provide the users with access to this share also through web browser (read-only is enough).
I installed OwnCloud as free BSD jail at FreeNAS and mounted FreeNAS storage as "External Storage".

Since I did that, almost any operation in owncloud takes very long. Worse - I often get "General error: 5 database is locked" error, which is making the service unavailable. Sometimes it is enough to wait a while, sometimes apache daemon restart is necessary. This happens often enough to consider this solution unusable.

I've noticed that SQLITE database used by owncloud has about 170 MB and oc_filecache has more then 500000 entries: probably all files from this external storage.
This led me to conclusion (maybe wrong), that it is sqlite operations on files cache that makes it so long, and that are indirectly causing lock condition.

Anyway - is it possible somehow to disable caching for selected storage? Or any other hint how to solve my problem?

Activity

  1. DeepDiver1975 commented on Jul 17, 2014

    @DeepDiver1975
    Contributor

    We need to keep the file information in the database - this is one of the most basic principles within ownCloud.
    Please note that sqlite is not the recommended database for that amount of data.
    Do you have the possibility to use mysql or pg?

  2. macmacy commented on Jul 17, 2014

    @macmacy
    Author

    That was my first thought, but I could not find any migration procedure from sqlite to mysql for ownCloud v. 6 (only for 5).
    Maybe I will try to setup it from scratch with mysql.
    Looks like I have no other choice if caching is "one of the most basic principles within ownCloud".
    Generally slow access is not such a big problem for me, but permanent database locks is KO.
    Thanks for response.

  3. DeepDiver1975 commented on Jul 17, 2014

    @DeepDiver1975
    Contributor

    That was my first thought, but I could not find any migration procedure from sqlite to mysql for ownCloud v. 6 (only for 5).

    This will be introduced with OC7

    Generally slow access is not such a big problem for me, but permanent database locks is KO.

    Unfortunate these database locks with sqlite can happen - especially in multi-user environments or in environments with a lot of data.

    We are aware of this issue and we did the best we could do up to now - sorry

  4. locked as resolved and limited conversation to collaborators on Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions