Hi everybody!
I installed Nginx 1.2.1, php5-fpm and Owncloud 4.0.4.
I works but... terribly slowly! It takes about 30sec to display a page.
During the rendering of a page, on server-side, I noticed that the process "php-fpm : pool www" uses all the CPU cycles.
I saw some posts on the forum and on the web saying that Owncloud runs quite smoothly on the rPi (using Apache), so, I suppose that it is a configuration issue. I thought that Nginx would be lighter that Apache...
I've not done any web development for some years, and I don't know how can I debug a web/php application in order to find the bottleneck.
Using the developper tool of Chrome, it seems that it is waiting most of the time for the CSS files, I don't have any other clues.
Any help?
Owncloud is soooo slow!
15 posts
My RaspberryPi hosted blog [FR] : http://slashome.zapto.org
- Posts: 67
- Joined: Sat Feb 04, 2012 8:49 am
nginx is alot lighter than Apache, but again the speed of it relies on your configurigation, your network speed, contention ration and the other services you have running on the Pi too.
Owner of: http://www.fusionstrike.com - I make gorgeous Raspberry Pi Tutorials 
- Posts: 99
- Joined: Sun May 27, 2012 12:18 pm
- Location: Manchester, United Kingdom.
I'm running nothing else on the Pi and it is connected by a RJ45 wire (100Mbps) to the local network. And I try to access to Owncloud locally, for now. So, I think the only problem is the configuration.
But I don't know where to look for, there are so many parameters in Nginx and PHP/PHP-FPM...
But I don't know where to look for, there are so many parameters in Nginx and PHP/PHP-FPM...
My RaspberryPi hosted blog [FR] : http://slashome.zapto.org
- Posts: 67
- Joined: Sat Feb 04, 2012 8:49 am
You could try installing APC for PHP. APC is an opcode accelerator that caches frequently used bits of PHP so it doesn't have to constantly recompile scripts (because PHP is an interpreted language). Install it with the following command and see if that helps.
sudo apt-get install php-apc
sudo apt-get install php-apc
Ben Hanna
Ducky Pond Software
http://ducky-pond.com
Ducky Pond Software
http://ducky-pond.com
- Posts: 23
- Joined: Sun Oct 02, 2011 5:36 am
Yeah, I could try php-apc.
But in my mind, there is another issue... I don't thing that the other posts I saw about owncloud/apache mentioned any optimizer...
But in my mind, there is another issue... I don't thing that the other posts I saw about owncloud/apache mentioned any optimizer...
My RaspberryPi hosted blog [FR] : http://slashome.zapto.org
- Posts: 67
- Joined: Sat Feb 04, 2012 8:49 am
Yeah, but it could still reduce some of that processing. Also are using SQLite as your database?
Ben Hanna
Ducky Pond Software
http://ducky-pond.com
Ducky Pond Software
http://ducky-pond.com
- Posts: 23
- Joined: Sun Oct 02, 2011 5:36 am
Yes, I forgot to mention that I'm using sqlite... Should be lighter than Mysql, but it doesn't seems to be enough 
My RaspberryPi hosted blog [FR] : http://slashome.zapto.org
- Posts: 67
- Joined: Sat Feb 04, 2012 8:49 am
Another thing : I'm using an external USB hard drive as root file system.
My RaspberryPi hosted blog [FR] : http://slashome.zapto.org
- Posts: 67
- Joined: Sat Feb 04, 2012 8:49 am
Hi JF002, seems that I'm to stupid to send PMs, so here's your answer. I'm running a "normal" Apache 2.2 with no optimisers for PHP, the configs are untouched. In the Install Guide it says you should enable the Apache Mod's rewrite and headers and enable .htaccess files.
Did you check the equivalents for nginx? If you're using Squeeze try the new Raspbian!
Did you check the equivalents for nginx? If you're using Squeeze try the new Raspbian!
- Posts: 2
- Joined: Tue Jul 24, 2012 3:38 pm
I've just installed PHP-APC and the difference is huge!!!
Now pages load in ~4s!
So, perhaps you were right, benthepoet! I don't understand how it's possible that the processing of PHP code takes more than 30sec on a 700MHZ CPU, but I'm no PHP expert...
I think it could be interesting to debug this issue deeper in order to find the bottleneck and a better solution.
Now pages load in ~4s!
So, perhaps you were right, benthepoet! I don't understand how it's possible that the processing of PHP code takes more than 30sec on a 700MHZ CPU, but I'm no PHP expert...
I think it could be interesting to debug this issue deeper in order to find the bottleneck and a better solution.
My RaspberryPi hosted blog [FR] : http://slashome.zapto.org
- Posts: 67
- Joined: Sat Feb 04, 2012 8:49 am
ProudlyPiOwner wrote:Hi JF002, seems that I'm to stupid to send PMs, so here's your answer. I'm running a "normal" Apache 2.2 with no optimisers for PHP, the configs are untouched. In the Install Guide it says you should enable the Apache Mod's rewrite and headers and enable .htaccess files.
Did you check the equivalents for nginx? If you're using Squeeze try the new Raspbian!
To be honest, I did not try to find equivalents to Apache Mod's rewrite, htaccess,... as owncloud is working. I thought that if a functionality was missing, it would not work at all. But you're write, I'll try to find some information about that!
Thanks for your answer!
My RaspberryPi hosted blog [FR] : http://slashome.zapto.org
- Posts: 67
- Joined: Sat Feb 04, 2012 8:49 am
I've just installed apache2 and Owncloud on it and it seems to run faster than using Nginx...
It's still slow (~10sec without apc, 3-5 sec with apc) but it seems smoother...
I didn't know that PHP was so heavy and needed so much processing power!
It's still slow (~10sec without apc, 3-5 sec with apc) but it seems smoother...
I didn't know that PHP was so heavy and needed so much processing power!
My RaspberryPi hosted blog [FR] : http://slashome.zapto.org
- Posts: 67
- Joined: Sat Feb 04, 2012 8:49 am
Last week I tried Debian w/ Apache2 & owncloud 4.0.4 .
It was incredibly slow on the PI. I did not find the cause of the slowness yet.
Disk ?
I tried external USB hdd's & USB sticks which improved read performance considerably.
CPU ?
I kept a look on the TOP cpu usage while running Owncloud. I can't confirm with a 100% certainty but CPU usage seemed OK.
Memory ?
I played a lot with the memory settings CPU / GPU. Made no difference regardless of the amount I assigned to the CPU.
It must be some kind of configuration issue. For now I skipped owncloud and went pure Debian w/ Apache2 & Webdav. Incredibly fast and responsive to browse folders and sync.
It was incredibly slow on the PI. I did not find the cause of the slowness yet.
Disk ?
I tried external USB hdd's & USB sticks which improved read performance considerably.
CPU ?
I kept a look on the TOP cpu usage while running Owncloud. I can't confirm with a 100% certainty but CPU usage seemed OK.
Memory ?
I played a lot with the memory settings CPU / GPU. Made no difference regardless of the amount I assigned to the CPU.
It must be some kind of configuration issue. For now I skipped owncloud and went pure Debian w/ Apache2 & Webdav. Incredibly fast and responsive to browse folders and sync.
- Posts: 1
- Joined: Fri Jul 27, 2012 10:27 am
Hey,
I also had this problem, and I don't think it will run fast. This is just to much juice for the Pi
I used lightspeed http.
I also had this problem, and I don't think it will run fast. This is just to much juice for the Pi
I used lightspeed http.
- Posts: 17
- Joined: Wed Aug 08, 2012 8:54 pm
I have the same issue on owncloud 4.5.
Thanks for tip with 'php-apc' now it works much faster.
I'll try to dig dipper and make it work even faster.
Thanks for tip with 'php-apc' now it works much faster.
I'll try to dig dipper and make it work even faster.
- Posts: 1
- Joined: Tue Dec 18, 2012 9:58 am