Backup

How to make your ownCloud server sync 5-10 times faster



I have been running my ownCloud server for just over a week, and for the life of me I could not figure out why on earth my syncing speeds were so slow. Here is the answer:

Don't use a SQLite database, USE MySQL.

Sorry for the use of caps and bold, but I just wish that someone had mentioned that before I set it up. If you have already set up ownCloud and are using a MySQL database, you can now commence your laughter and finger pointing at my naïvety and move on. If however, you have not yet set up ownCloud, it might be worth your while to read on.

Just over a week ago I set up my own ownCloud server. It was pretty easy and straightforward to do. Unfortunately, it may have been a bit too straightforward, and I blindly selected the default database when setting up the server. I don't know why (probably for simplicity's sake), but by default the database is set to use SQLite. If you want decent speeds, then you should NOT use SQLite; use any other database method (I used MySQL).

With SQLite, I was syncing files at about 1 or 2 files a second (for very small files). To put this in perspective, if you have a program that you are trying to sync with hundreds of configuration or language files that are very small, it will still take you several hours to upload.
With MySQL, I have been able to sync several files each second. My speed has increased about 20 fold.

If you already made the mistake of using SQLite for your ownCloud server, you can do what I did and simply start the installation over again.

To do this, browse to your config file. (In Linux) You can probably find it in /var/www/owncloud/config/config.php

Change the line: "installed" => true,
to:
"installed" => false,

Next time you use your browser to access ownCloud, it will go through the installation process again. Make sure that you select "Advanced." This time you can select MySQL and set your MySQL database credentials.

Select "MySQL" NOT SQLite
Digital Ocean has a great tutorial on setting up a MySQL database if you need help with that.


About McKay Christensen

After having lived in Oregon, Alaska, and China for the past 10 years doing landscape design and English teaching, I have returned to my home state of Utah and currently work for a growing tech company.

In my free time I enjoy working on my TutorialGeek.net website where I post tutorials and reviews (and anything else I think is geeky) and I also like to write songs for my Super English Kid Youtube channel.

My favorite things to do include anything with my wife and son. Hiking, camping, and photography (or anything else outdoors). Playing Ultimate Frisbee or Ping Pong. Listening to 60s, 70s, or 80s, music. 

Feel free to contact me using my contact page. I would love to hear from any of you!

2 comments:

  1. It was not only 5-10 times faster, it was much more than that.
    For me a sync that was taking about 2 days or so finished in about 25 minutes. =)

    ReplyDelete

Powered by Blogger.