Page 1 of 1

Image list in the control panel

Posted: 18 Dec 2013, 13:35
by Tryphon
Hi,

I see something strange in Control Panel/Images where we can manage our image collection. Normally, without filtering, Phoca can list the whole collection. But over a limited number of images (say several thousands of pics, I do not know exactly), the list is empty whatever I do ... except if I enter something in the filter field which comes to limit the number of pics to list. In this case, I cannot manage my big collection (15000 pics) in one shot.

Can someone give an explanation?

Thank you.

Joomla 2.5, PhocaGallery 3.2.2 on a home Qnap server.

Re: Image list in the control panel

Posted: 25 Dec 2013, 19:40
by Jan
Hi, do you get any error there, maybe some memory problem :idea:

Jan

Re: Image list in the control panel

Posted: 28 Dec 2013, 22:19
by Tryphon
Hi Jan,

The server has 1 Go RAM and 512 Mo for the swap. When I ask for a list of my pics using the filter, the memory usage grows up to 70 % (from a background at 55 %). If I left the filter blank, the memory usage stays at 55 % during the mysqld process activity. There isn't any error message or warning at screen or in the system event logs of the server. Apart from this, Phoca works normally when I use the filter.

Thank you for reading.

Re: Image list in the control panel

Posted: 29 Dec 2013, 20:03
by Jan
Hi, maybe on your server there is some limit, I unfortunately cannot say what happen on your server, but maybe:

- if you list the images with filter, your server is able to return the items and of course this takes some resources
- if you don't use the filter, there are so many items that your server is not able to display them, so there is some limit (or error) which is displayed and this does not take any resource.

But really cannot say what exactly happens on your server :-(

Re: Image list in the control panel

Posted: 06 Jan 2014, 01:42
by rm3086
Hello,
I am also having issues with the Image list in the control panel it takes almost three minutes for it to return 5 items. When I look at the debug output in Joomla I see in the profile the Application: afterDispatch takes 289052.9 ms to finish and uses 6.9 MB of memory. Below is part of the debug dump/


Profile Information
**Time**: 2.8 ms / ...

Re: Image list in the control panel

Posted: 06 Jan 2014, 17:11
by Jan
Hi, try to disable all loaded modules and system plugins and test if this is changed.

Jan

Re: Image list in the control panel

Posted: 07 Jan 2014, 05:22
by Tryphon
Thank you Jan. I will see a difference when I get a new Qnap server with 3 GB RAM :P .

Have a good day.

Re: Image list in the control panel

Posted: 08 Jan 2014, 00:38
by rm3086
Hello,
I have narrowed down to the fact I am using NFS mount to access my photo repository on my NAS which lead to performance issue. To remedy this I have incresed the following:
realpath_cache_size = 1024M
realpath_cache_ttl = 360
max_execution_time = 360
memory_limit = 512M

Using the performance tweak I do some improvements, but as I looked deeper I see that whenever the Image list or the Multiple Add pages are loaded I see a scan that runs through every Picture and thumbnail that I have (over 150,000). This is occurring even when i only show the first 20 images on the list or just the top level directory structure of my image storage.

Output of the strace:
stat("/var/www/Alexandria/images/phocagallery//CollectionPics/20060406Berlin/IMG_4012.JPG", {st_mode=S_IFREG|0777, st_size=2408896, ...}) = 0
stat("/var/www/Alexandria/images/phocagallery//CollectionPics/20061022KingRichards/thumbs/phoca_thumb_m_IMG_8606.JPG", {st_mode=S_IFREG|0644, st_size=3374, ...}) = 0
stat("/var/www/Alexandria/images/phocagallery//CollectionPics/20061022KingRichards/thumbs/phoca_thumb_s3_IMG_8889.JPG", {st_mode=S_IFREG|0644, st_size=4401, ...}) = 0
stat("/var/www/Alexandria/images/phocagallery//CollectionPics/20061022KingRichards/thumbs/phoca_thumb_m_IMG_8689.JPG", {st_mode=S_IFREG|0644, st_size=6015, ...}) = 0
stat("/var/www/Alexandria/images/phocagallery//CollectionPics/20061022KingRichards/thumbs/phoca_thumb_m3_IMG_8408.JPG", {st_mode=S_IFREG|0644, st_size=12284, ...}) = 0
stat("/var/www/Alexandria/images/phocagallery//CollectionPics/20061022KingRichards/thumbs/phoca_thumb_s2_IMG_8797.JPG", ^C{st_mode=S_IFREG|0644, st_size=2826, ...}) = 0


I have check the throughput to my NAS and it is about 100 MB/s, that should more than enough for this. Looking at the the data below the server is barely taxed, only one core is actually working during this and there is substancial free memory and swap is not being used. I am a little confused do you know why there is this continual file scan of the entire collection even if Thumbnail creation is turn off? I believe this is what is causing the poor performance.





Apache process memory usage
Number of processes = 11
Memory usage per process = 32.3143 MB
Total memory usage = 355.457 MB


load average: 1.38, 1.09, 0.74

Mem: 15548788k total, 4195284k used, 11353504k free, 173188k buffers
Swap: 7553016k total, 0k used, 7553016k free, 3243316k cached


Thanks

Re: Image list in the control panel

Posted: 09 Jan 2014, 00:25
by rm3086
Hello again,
Doing further research I see the problem is still with PHP and NFS (php.webtutor.pl/en/2011/06/02/running-php-on-nfs-huge-performance-problems-and-one-simple-solution/#more-1579). Is there a way to get the parameters for the images need to do the Mosaic tiling I would like to create these manually. Phoca has not problem creating the files quickly but everything it creates a thumbnail the PHP subsystem makes a call and traverses the entire data source, which now takes serveral seconds. I was unable to get the real_path_turbo extension to work so I would really like to be able to make the correct number and sizes of thumbnails.


Thanks

Re: Image list in the control panel

Posted: 09 Jan 2014, 23:05
by Jan
Hi,

1) if thumbnails creation is enabled - Phoca Gallery automatically scans for all images and creates thumbnails from them (it is recommended to disable this after thumbnails are created)
2) if pagination thumbnail creation is enabled - then Phoca Gallery scans only the images loaded on the site (e.g. 20 only)

3) if the thumbnail creation is disabled - there is no scan for the images, so there should not be any problem :idea:

You can create own thumbnails for the images and load them to the server.

I will recommend to you to enable pagination thumbnail creating - then to create all the thumbnails you should go from one site to another and the thumbnails will be scanned only for the site (you can set if 20 or 100 will be loaded on the page) but this should be Ok for the server. I have tested it with many thousands images and pagination set to 100 and it was Ok (of course it took some time to got through all the sites but It was Ok for the memory)

Jan