Announcement

#1 2014-12-29 10:27:00

komi
Member
2014-10-17
22

Configure the number of threads for conversion

Hi,

is it possible to configure the number of threads used for picture conversion? I think a smaller number would be more efficient on my machine due to memory and CPU constraints.

Cheers
Konstantin

Offline

 

#2 2014-12-29 10:49:21

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Configure the number of threads for conversion

Are you using  GD or Imagemagick ?

Anyway if it's configurable it's not on Piwigo, but on your server

Offline

 

#3 2014-12-29 11:10:16

komi
Member
2014-10-17
22

Re: Configure the number of threads for conversion

mistic100 wrote:

Are you using  GD or Imagemagick ?

Anyway if it's configurable it's not on Piwigo, but on your server

I am using Imagemagick.

How can I configure that on my server? I thought it's Piwigo that decides how many photos shall be converted in parallel?

Offline

 

#4 2014-12-29 11:12:49

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Configure the number of threads for conversion

Yes, but it's not the same thing as "threads"

For number of parallel ajax requests :
$conf['max_requests'] = 3;

Offline

 

#5 2014-12-29 11:21:36

komi
Member
2014-10-17
22

Re: Configure the number of threads for conversion

mistic100 wrote:

Yes, but it's not the same thing as "threads"

For number of parallel ajax requests :
$conf['max_requests'] = 3;

Thanks for the suggestion but unfortunately it didn't work.

With 'top' I still see a number (>3) of 'convert' processes (or threads, since on Linux, threads and processes are almost the same) started when I open a page containing thumbnails that have not yet been created.

I am using Ubuntu 13.04.

Offline

 

#6 2014-12-29 11:25:56

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Configure the number of threads for conversion

The code I gave is the default value: 3

It certainly work and do what is expected: limit the number of parallel AJAX requests for image generation (for each user)

we don't have the hand on how ImageMagick handles the conversions requests (and myself I don't know what is configurable), if he chooses to convert a single image with 4 threads I don't know what you can do

Offline

 

#7 2014-12-29 11:51:27

komi
Member
2014-10-17
22

Re: Configure the number of threads for conversion

mistic100 wrote:

The code I gave is the default value: 3

It certainly work and do what is expected: limit the number of parallel AJAX requests for image generation (for each user)

we don't have the hand on how ImageMagick handles the conversions requests (and myself I don't know what is configurable), if he chooses to convert a single image with 4 threads I don't know what you can do

Thanks. I now set the MAGICK_THREAD_LIMIT environment variable appropriately and will see if it achieves the desired effect next time I reboot the server.

Offline

 

Board footer

Powered by FluxBB

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