#1 2022-12-07 17:09:51

Eis-T
Member
2022-11-03
12

How to reduce loading times & cpu usage?

Hi,

I'm currently running an ubuntu 18.04 homeserver with piwigo on it. The system loads the pictures very slowly and often crashes when I change the default gallery size from 10 pictures to 50. I've probably not configured it well yet, and I can't find any information on how and where to improve this situation. Ideally I want to have thumbnails pre-generated, but doing so from the batch manager overheats the system and crashes it as well (there's 8000 pictures on there, giving a command to resize them all in 5 different formats crashes the system)
What are the parameters I should play with, and where do I find them? What helped to improve the performance of your photo gallery?

Thanks for the advice!

Last edited by Eis-T (2022-12-07 17:10:35)

Offline

 

#2 2022-12-07 20:13:44

erAck
Only trying to help
2015-09-06
2196

Re: How to reduce loading times & cpu usage?

Whatever "crashes the system" may exactly mean, my first bet would be it doesn't have enough free RAM available.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2022-12-08 16:37:30

irisv
Member
2022-12-07
3

Re: How to reduce loading times & cpu usage?

I'd start with php.ini - look at values like max_execution_time and memory_limit to prevent timeouts.

Offline

 

#4 2022-12-09 00:12:44

Eis-T
Member
2022-11-03
12

Re: How to reduce loading times & cpu usage?

Thanks! editing php.ini helped a lot! apparently it was set to allot only 128M... no wonder it ran so poorly! I keep learning more and more about self-hosting :)

Offline

 

#5 2023-01-17 18:24:22

Eis-T
Member
2022-11-03
12

Re: How to reduce loading times & cpu usage?

Things are going better now I've switched to Imagemagick to render. Two things:

- I've seen in multiple topics here that the rendering/resizing can be done on the client-side. But I haven't found out where to configure that. I assume there's a line of code I need to paste in the LocalFiles Editor.
- Imagemagick is processing all pictures in a folder at the same time instead of one-by-one, causing CPU and memory problems. is there a way to make it work picture by picture?

Offline

 

#6 2023-01-17 18:26:52

BigIsland270972
Member
Norway
2022-03-15
374

Re: How to reduce loading times & cpu usage?

Following


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#7 2023-01-17 19:20:12

TOnin
Member
1970-01-01
109

Re: How to reduce loading times & cpu usage?

On GNU/linux like system, what about nicing the imagemagick process ?

Code:

man nice

If it's one single process, this could be done once on the run from top.
Otherwise, I imagine nice could be added to the execute command within piwigo. This may need code editing...

Offline

 

#8 2023-01-22 18:10:19

Eis-T
Member
2022-11-03
12

Re: How to reduce loading times & cpu usage?

I like the idea, not sure how to do this though!
Also I learned that my hardware should be capable of hosting this without overheating. I also run a music server (slimserver) and it instantly loads hundreds of album covers without any problems. There's something very wrong with my configuration of piwigo.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact