Re: Disk access performance
- From: Helge Jensen <helge.jensen@xxxxxxx>
- Date: Thu, 06 Apr 2006 08:19:58 +0200
huayra wrote:
I am working in an application, where multiple threads have parallel disk
access to process each one file. The threads are independent, no critical
section or syncronization between them exist nor is necesary. They do not
process the same file.
In my experience, disk I/O on windows parralelizes very poorly -- try
copying 2 files from or to the same disk at a time (let the OS wars
begin :).
I need some advice about how to get the best performance out of this
scenario. Also, if somebody can suggest a tool to look at the times each
thread expends waiting for a disk access system call, and stuff like that.
Getting a diagnostics tool is definatly the way to go -- otherwise you
may end up chasing ghosts.
A specific tool would be best, unfortunatly I don't know of any.
A sampling profiler should be able to show you roughly how much time is
spent waiting for disk-IO, but beware the profiler might affect the
scenario here, where there is real parallelism between the CPU and I/O.
You can modify your program to access files through adapters that
measure time spent in I/O. This may not be that complicated since you
can inject the adapter where the files are opened.
If you have a virus-scanner with "on-access" scan, disable it.
Virus-scanners with on-access are som of the worst viruses you can get
-- they steal your productivity little by little.
If you have enough memory you could linearize the reading of the files
between threads, and read them into memory in their entirity. I know
this is not a nice solution, but it *may* just work without a whole lot
of development effort.
For a more complicated solution you could read the files into memory in
large chunks via a Stream adapter, and linearize that between threads.
This may allow you to more effectively utilize the CPU.
--
Helge Jensen
mailto:helge.jensen@xxxxxxx
sip:helge.jensen@xxxxxxx
-=> Sebastian cover-music: http://ungdomshus.nu <=-
.
- Follow-Ups:
- Re: Disk access performance
- From: Alvin Bruney
- Re: Disk access performance
- From: Vadym Stetsyak
- Re: Disk access performance
- Prev by Date: win32 service 2 service communication
- Next by Date: Re: Disk access performance
- Previous by thread: win32 service 2 service communication
- Next by thread: Re: Disk access performance
- Index(es):
Relevant Pages
|