0

I have a process running that is opening TIF files. Each TIF file is just one regular page and they are maybe 100 kB each. Every time he opens a TIF file it tries to read a barcode in a specific area on the page.after it reads the barcode in the specified area it closes the file and opens the next file. For some reason this process is taking about 3 seconds per file. This is too long for us. What can we do to speed this up? The server that is running this is a quad core 2.1 GHz processor with plenty of RAM. I checked the CPU and the memory and everything seems to be under used. How can I find where the bottleneck is? How do I speed up this process?

running on windows server 2008

Alex Gordon
  • 455
  • 3
  • 14
  • 31
  • 6
    not tempted to include OS details in here? what code you're using etc? give us a chance dude – Chopper3 Mar 08 '11 at 18:20
  • if your CPU/mem use is low check the disk I/O with something like iotop. However it does seem unlikely to be disk I/O if the files are only 100kb. From the information you have provided I would think the problem lies within this 'process'. Have you thought about just spawning multiple of these processes? – Will Mar 08 '11 at 19:13
  • @will what does spawning mean – Alex Gordon Mar 08 '11 at 19:14
  • He means doing the work in parallel (aka multi-threading). Insight into the code being used would be helpful. – Jon Onstott Mar 08 '11 at 22:27

3 Answers3

1

In Windows Server 2008 a high level view of resources is Resource Monitor. Even a 4 year old low end server could open files faster then you are describing, so I would expect it to be in the code as well.

For a sysadmin (someone who is not a developer) your common "deep" tools to see what is going on are to use Microsoft Sysinternals tools Process Explorer and Process Monitor. Process Explorer will allow you to right-click the running program and dig down into the performance of that process, and see threads, strings, etc. Process Monitor will let you see all the reading/writing to file system and registry the process is doing.

Bret Fisher
  • 3,973
  • 2
  • 21
  • 25
1

If the files are hosted on a SAN or NAS you are looking at the potential for network latency here.

Does your program have a log file? Can you turn on logging?

The problem does seem to either be with the I/O (possibly network if that is how it's hosted) or the the software itself. I would check into those two pieces first.

Mike
  • 802
  • 4
  • 5
0

Depending on the specifics I would start by profiling or benchmarking the application. If possible, profiling should be able to give you a good indication of what the application is doing over the 3 seconds. Alternatively, you can benchmark the application's speed over a variety of conditions (a regular TIF, an all black TIF, a white TIF, just loading a TIF but not parsing it, etc...). This should also give you an indication of the bottleneck in a round about way.

Found your description, however, I would guess that such an operation would be application and CPU limited. A well designed application shouldn't take 3 seconds to parse a barcode in a fixed location on even a low end CPU.

uesp
  • 3,414
  • 1
  • 18
  • 16