[Samba] samba over internet slow with images/thumbnails

Stan Hoeppner stan at hardwarefreak.com
Thu Nov 11 00:13:05 MST 2010

JP CR put forth on 11/10/2010 11:42 PM:
> Hello,
> Iam providing access to many images on a share to windows users from my linux samba over the internet. The problem is that I need thumbnail viewing because of the nature of this library and thumbnails take to much time to load it seems as though it is actually loading the entire image to then display the small thumbnail. Is this true?

Probably yes, especially if there is not thumbs.db file.  The remote
Windows client, when in thumbnail view in Explorer, will download the
entire image and create the thumbnail.  In a directory with hundreds or
thousands of image files, this will take a long time, possibly hours,
over a 1Mb/s broadband connection, for a directory with say 5000 image

> Also isnt there some kind of caching that can be activated? 

The caching would have to take place on the client side.  AFAIK Explorer
performs no file caching.  Any web browser will, unless it's been disabled.

> Anything to increase this speed. Each image weights about 800kb, and the user is sitting on a 1mbit line but it takes several seconds for each image.

It should take about 6.4 seconds to load each file, assuming no
overhead.  You will have overhead, so you're looking at 6.4 to 10 or
more seconds per file.  How many files are in this directory?

> Simply not the best experience.

Well of course not.  You're using the wrong tool for the job.  You
should be hosting/serving up these files via http.  I find lighttpd +
curator is a good combination for serving lots of static image files.
It works great, as long as the filenames have no spaces in them.  Other
special characters seem to work fine.

If you use this method, and the contents of the image directory change
frequently, simply cron curator to run on that directory each night.

Using lighttpd (or any web server) and curator, you can achieve
something like this: http://www.hardwarefreak.com/construction/

This image page is served from a 500 Kbit/s upstream channel ADSL line.
 This should give you an idea of the performance you might expect.

Click on each thumbnail image to see the full size image.  Click on the
links in the top right corner to see alternative views and sorting of
the thumbnails by file name.  You can also click the left and right
arrows for a manual slide show, or simply click the top left/right
corner of each full size image.

To do all of this, simply install curator and the dependencies, cd into
the image directory, and type "curator ./".  It's that simple.  This
command created everything you see at the link above.

Your *nix distribution may or may not have a curator package.  If not,
try here:  http://curator.sourceforge.net/local/

Also note curator does not work well, if at all, with GIF files.  JPGs
work great.


More information about the samba mailing list