You Are here: Home News Ubuntu / Linux / Unix Speed up thumbnailing on Synology DS211j

20 -May -2012
Register

REGISTER

*
*
*
*
*
Fields marked with an asterisk (*) are required.
Speed up thumbnailing on Synology DS211j PDF Print E-mail
News - Ubuntu / Linux / Unix
Written by Mark Veenstra   
Tuesday, 01 February 2011 19:26
When using Photostation on the Synology DS211j you encounter the problem that converting of thumbnails is taking to much time (if you handle a lot of photos at once). You can speed this process up as I found from the Synology forum. Just pasting this on my own site to have it backupped :).
The fix is that it looks like the unsharp option makes thumbnailing slow. On my NAS I tested it:
1
2
3
4
time convert -size 800x800 -unsharp 0.5x0.5+1.25+0.0 picture.jpeg picture-converted.jpeg
real    1m 17.04s
time convert -size 800x800 picture.jpeg picture-converted.jpeg
real    0m 4.88s
So if you want to speed up the converting of images you could use this script that comes from the Synology forum:
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl -w
@new_args = ();
$old_arg = "";
for $arg(@ARGV) {
  if($arg eq "-size") { $arg = "-sample"; }
  if($arg ne "-unsharp") {
    if($old_arg ne "-unsharp") {
      push @new_args, $arg;
    }
  }
  $old_arg = $arg;
}
exec "/lib/hddapp/usr/syno/bin/convert", @new_args;
Put this Perl script in the file "/usr/syno/bin/convert_nosharpen.sh". Then chmod the file and symlink the original convert file to this new script (orginal the file "/usr/syno/bin/convert" was symlinked to "/lib/hddapp/usr/syno/bin/convert" on my DS211j).
1
2
chmod +x /usr/syno/bin/convert_nosharpen.sh
ln -sf /usr/syno/bin/convert_nosharpen.sh /usr/syno/bin/convert
Happy thumbnailing!
UPDATE!!!!
If you updated your DSM to version 3.1 and you have checked the option that you have an iPad, the Synology Photostation will create an extra thumbnail for iPad users. This means that all photos will get an extra thumbnail which will take a lot of resources. If you don't have an iPad, please unchecked that option in your DSM. If you do have an iPad, use above script, or if it is possible, make sure to upload your photos using the assistant software for your PC. This software will create the thumbnails by using resources of your PC!
If anyone has more information regarding this, please comment.


Share this....
Last Updated on Thursday, 26 May 2011 07:45
 

Comments 

 
#17 phillips321 2012-04-08 16:36
Guys,

For those running linux(or mac if you install imagemagic) on their desktop this code will use your desktop cpu to do the processing. Just run the script against the directory you wish to create the thumbnails for then reindex photostation.
phillips321.co.uk/.../...
I often upload 200-300 pics at a time so this speeds things up for me massively.
Have fun
Quote
 
 
#16 Oli 2012-03-27 20:52
I noticed that the thumbnailing process doesn't seam to end after the workaround is in place. It appears to get to 99% and then starts again. Anyone else encountered the same issue?
Quote
 
 
#15 Danilo 2012-03-27 14:53
With DS212J and DSM 4 has been tested ?
Quote
 
 
#14 Stephan 2011-12-20 10:15
Just applied the the script to my DS212j. It works like a charm!!! Thank you for sharing this.
Quote
 
 
#13 Oli 2011-11-15 23:26
Thanks for this information. I applied the change and its now ripping through the thumbnail creation at less than 80% CPU utilisation.

Makes my wonder why something so simple cant be implemented by Synology.

Do you know if the original convert script is used by any other part of the NAS? Wondering if I should revet back after the initial thumbnail creation.
Quote
 
 
#12 Shane 2011-10-19 06:35
Hi Mark,

Nice article on speeding this up. I have a new DS211 and have about 35000 photo's. So the thumbnail process is taking very long. I am a complete newbie when it comes to linux. Your guide is very good, but could you explain, step by step on what I should do?

I suspect that I have to telnet into the NAS, then run a few commands. I really would appreciate your help here as I have no idea what I am about to do. All I know is that you have found a solution to the problem I am having.

BTW: I have DSM 3.2 installed and using Photo Station 5.

Thanks
Shane
Quote
 
 
#11 Mark Veenstra 2011-09-21 08:47
Quoting Rudi Klein:
I assume there must be a real "convert" file where the symlinks point to?

Any help appreciated.

Thanks,

Rudi


Orginal the file "/usr/syno/bin/convert" was symlinked to "/lib/hddapp/usr/syno/bin/convert" on my DS211j.
Quote
 
 
#10 Rudi Klein 2011-09-17 21:00
Hi,

I applied this fix and it worked like a charm.

However, I thought it stopped working and re-applied the procedure. There it went wrong and I managed to screw up the symlinks.
Trying to fix it, made it worse.
Being a novice Linux user doesn't help either.

I have ended up with broken symlinks and all my new thumbs appear like "broken".

Can anyone tell me which symlinks should be created to make the convert process work again, either in original state or with the fix applied.

I assume there must be a real "convert" file where the symlinks point to?

Any help appreciated.

Thanks,

Rudi
Quote
 
 
#9 Abdel 2011-06-27 00:14
Hi All,

It is possible to disable this process from telnet or SSH session.

Execute the following command
/usr/syno/etc/rc.d/S77synomkthumbd .sh stop
/usr/syno/etc/rc.d/S77synomkthumbd .sh start

Bye
Quote
 
 
#8 Abdel 2011-06-27 00:12
Hi All,

If you want to stop the process in charge of thumbnail.
Run the following command from telnet or SSH session

/usr/syno/etc/rc.d/S77synomkthumbd .sh stop
/usr/syno/etc/rc.d/S77synomkthumbd .sh start

Bye
Quote