Author Topic: PM hangs when using network drive  (Read 15550 times)

Offline dtemp

  • Newcomer
  • *
  • Posts: 10
    • View Profile
PM hangs when using network drive
« on: December 08, 2006, 07:22:34 AM »
I store my photos on a NAS unit.  There is a full gigabit path from my computer to the server.  Tested transfer speeds range from 50 to 80 megabits/s.

Whenever there are more than 15 or so photos in a folder, PM stalls constantly.  If I double-click on a picture in the contact sheet to bring up the preview, it works fast, but when I close the preview to go back to the contact sheet, the program hangs for 30 seconds or so, like it is re-reading all the photos off the server.  Also, when I change the focus from another application back to PM, the program hands for 30 seconds, whether or not PM is in contact sheet or preview mode.

When I say hangs, I mean the screen isnt even redrawed.

I use PM on three different computers that connect to this server, all of which connect with 50-80mbps speeds, and they all suffer this problem.

Any ideas?  -Dave

Offline dtemp

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: PM hangs when using network drive
« Reply #1 on: December 08, 2006, 07:48:01 AM »
i should probably post my system specs:

pentium 4 3 ghz, 2GB ram, win xp pro, all other hardware generally high-quality.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 20635
    • View Profile
    • Camera Bits, Inc.
Re: PM hangs when using network drive
« Reply #2 on: December 08, 2006, 07:50:14 AM »
i should probably post my system specs:

pentium 4 3 ghz, 2GB ram, win xp pro, all other hardware generally high-quality.

What version of Photo Mechanic are you running?  What kind of images are you viewing (JPEG, TIFF, RAW, etc.)?

-Kirk

Offline dtemp

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: PM hangs when using network drive
« Reply #3 on: December 08, 2006, 08:48:05 AM »
The latest version of PM 4.4.3.3.  I'm viewing D200 RAW images (with RAW compression, approx 9MB each).

The thing is... when I view images stored on my hard drive, the program doesnt hang, it just loads the thumbnails/previews in the background without ceasing to function.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 20635
    • View Profile
    • Camera Bits, Inc.
Re: PM hangs when using network drive
« Reply #4 on: December 08, 2006, 09:25:47 AM »
The latest version of PM 4.4.3.3.  I'm viewing D200 RAW images (with RAW compression, approx 9MB each).

The thing is... when I view images stored on my hard drive, the program doesnt hang, it just loads the thumbnails/previews in the background without ceasing to function.

What file system is running on the server?

It sounds like the transfer speed is more than adequate for burst transfers, but it may not support random access to files very well, and it may be very slow for operations like querying for file lists and attributes on files.  If those things are slow then performance will definitely suffer.

Also, if when querying for modification time if the server gives back random data instead of the actual modification time, Photo Mechanic will reload the images since it would look like the modification time had changed.

-Kirk

Offline dtemp

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: PM hangs when using network drive
« Reply #5 on: December 08, 2006, 10:32:39 AM »
So the actual server is an Intel SS4000-E.  I believe it runs some sort of Linux?  It uses the regular SMB protocol thing so you can just type \\servername\drive\ in windows explorer.   It is a RAID-5... im not sure how great that is for random access.  It seems to provide accurate modification times.  I understand what the program is doing... its checking to see if there are new photos or changed photos in the folder.  Is there a way to turn this off?  This would be on my wish list for 4.4.3.4  ;)

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 20635
    • View Profile
    • Camera Bits, Inc.
Re: PM hangs when using network drive
« Reply #6 on: December 08, 2006, 10:36:15 AM »
So the actual server is an Intel SS4000-E.  I believe it runs some sort of Linux?  It uses the regular SMB protocol thing so you can just type \\servername\drive\ in windows explorer.   It is a RAID-5... im not sure how great that is for random access.  It seems to provide accurate modification times.  I understand what the program is doing... its checking to see if there are new photos or changed photos in the folder.  Is there a way to turn this off?  This would be on my wish list for 4.4.3.4  ;)

That would be a potentially very bad thing.

Can you open a DOS prompt and see how long it takes to get a directory listing on the folder you are browsing with Photo Mechanic?

If you need help doing this, send me a personal message by clicking on my name to the left of this message.  Give me your phone number and a best time to call.

-Kirk

Offline dtemp

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: PM hangs when using network drive
« Reply #7 on: December 08, 2006, 12:38:52 PM »
I did a DIR on a folder with 198 photos, the directory listing flew by immediately, well under 1 second.

I did a ping of the server and it says <1ms.

Offline dtemp

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: PM hangs when using network drive
« Reply #8 on: December 08, 2006, 12:43:04 PM »
That would be a potentially very bad thing.

I can understand how that would be bad if they were TIFFs or JPEGs or something, but my folders rarely "change", they are NEFs that sort of stay stagnant.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 20635
    • View Profile
    • Camera Bits, Inc.
Re: PM hangs when using network drive
« Reply #9 on: December 08, 2006, 03:37:02 PM »
That would be a potentially very bad thing.

I can understand how that would be bad if they were TIFFs or JPEGs or something, but my folders rarely "change", they are NEFs that sort of stay stagnant.

I'd really rather just find out what is going on and fix the issue so you don't have to remember to refresh the contact sheet manually.  If you would like to help me figure out what is going on, I'd be happy to build special logging versions of Photo Mechanic so we can find out specifically what is going wrong.

-Kirk

Offline dtemp

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: PM hangs when using network drive
« Reply #10 on: December 09, 2006, 10:09:31 AM »
Sure that would be great... i think the problem is that refreshing the contact sheet is something that is not done in the background... the application grinds to a halt while it is updating the contact sheet.  If it could just do that while allowing the program's GUI to remain functional, it wouldnt be an issue.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 20635
    • View Profile
    • Camera Bits, Inc.
Re: PM hangs when using network drive
« Reply #11 on: December 09, 2006, 05:29:55 PM »
Sure that would be great... i think the problem is that refreshing the contact sheet is something that is not done in the background... the application grinds to a halt while it is updating the contact sheet.  If it could just do that while allowing the program's GUI to remain functional, it wouldnt be an issue.

You're right in that the rescan is done on the event thread, but it must be done that way for thread safety reasons.  Generally rescanning a folder with even 30,000 (!) items only takes but a second or two on a local hard drive.  There must be an issue with either your server, or the way that Photo Mechanic is hitting your server for the information it needs.  In any rate a test version with data logging turned on will help find out what is going wrong.

-Kirk

Offline jjlists123

  • Newcomer
  • *
  • Posts: 36
    • View Profile
Re: PM hangs when using network drive
« Reply #12 on: December 10, 2006, 05:03:38 PM »
I have this exact same problem.

In my case, I am using a NAS box running Ubuntu 6.06.

If I'm using PM actively, response is very quick.  The contact sheet populates in a few seconds.
However, if I leave the PM window open and idle for a period of time (overnight, for example), the response becomes very, very slow. This slowdown happens each time the PM application gains focus and is in the order of 20-45 seconds.  During this time, the UI hangs and no interaction is possible and no screen updates occur.

Interestingly enough, once you get past the hang delay, response is quick until PM loses focus and you switch back again (e.g.  you switch to your email program then switch back to PM). Each time you switch back to PM, you have to suffer through this long wait until it becomes active and responsive again.

As a work around, you can close PM and restart it.  Once you do, you can switch back and forth between PM and other applications without delays.  So, I'm sure it's something within PM itself, not the NAS storage devices.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 20635
    • View Profile
    • Camera Bits, Inc.
Re: PM hangs when using network drive
« Reply #13 on: December 10, 2006, 05:38:14 PM »
I have this exact same problem.

In my case, I am using a NAS box running Ubuntu 6.06.

If I'm using PM actively, response is very quick.  The contact sheet populates in a few seconds.
However, if I leave the PM window open and idle for a period of time (overnight, for example), the response becomes very, very slow. This slowdown happens each time the PM application gains focus and is in the order of 20-45 seconds.  During this time, the UI hangs and no interaction is possible and no screen updates occur.

Interestingly enough, once you get past the hang delay, response is quick until PM loses focus and you switch back again (e.g.  you switch to your email program then switch back to PM). Each time you switch back to PM, you have to suffer through this long wait until it becomes active and responsive again.

As a work around, you can close PM and restart it.  Once you do, you can switch back and forth between PM and other applications without delays.  So, I'm sure it's something within PM itself, not the NAS storage devices.

This indicates that the rescanning of the folder must be slow.  What kind of sort are you having PM do?  (Capture Time, Filename, Modification Time, etc.)

-Kirk

Offline jjlists123

  • Newcomer
  • *
  • Posts: 36
    • View Profile
Re: PM hangs when using network drive
« Reply #14 on: December 11, 2006, 08:34:06 AM »
I use the "sort by filename" option.

Once PM gets past the initial delay, it's fast again.  Even opening new folders that have not been scanned before are quick.
It's just the initial ALT-TAB to make PM the active application, which triggers the delay. And only after PM sits idle for a few hours (like, all night).

When the slow down occurs, the CPU is idle and there is very, very little network traffic to the NAS box (there is no indication that PM is pulling data across the network).  Although it's possible that PM issued a request and when no data arrives, waits until the request times out.   This would explain the CPU not being active and the lack of network traffic.