Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
not tempted to include OS details in here? what code you're using etc? give us a chance dude – Chopper3 Mar 8 '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 8 '11 at 19:13
@will what does spawning mean – l--''''''---------'''''''''''' Mar 8 '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 8 '11 at 22:27
up vote 1 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.