CPU usage during File Transfer
-
Hi, I have a Windows application which actually carries out a file transfer operation from a SCSI device to the local directory. However during the file transfer and DB updates, the CPU usage shoots up to 100%. Can anyone help me in optimizing the CPU usage? Thanks in Advance, KKrista
-
Hi, I have a Windows application which actually carries out a file transfer operation from a SCSI device to the local directory. However during the file transfer and DB updates, the CPU usage shoots up to 100%. Can anyone help me in optimizing the CPU usage? Thanks in Advance, KKrista
More info needed: How are you copying the file?
Cheers, Sebastian -- "If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
-
Hi, I have a Windows application which actually carries out a file transfer operation from a SCSI device to the local directory. However during the file transfer and DB updates, the CPU usage shoots up to 100%. Can anyone help me in optimizing the CPU usage? Thanks in Advance, KKrista
That sounds like one of the disks is in Programmed I/O (PIO) mode rather than Direct Memory Access (DMA). In DMA mode, the OS sends a command to the disk to start a read operation which contains a physical memory address to copy the data to. The disk accepts this request and the OS blocks the thread, then carries on with something else (or halts the processor if there are no threads to run). The disk then borrows bus cycles to copy the data directly into memory; when done, it interrupts the processor to signal that the transfer is complete. Writes are much the same, in the other direction. In programmed I/O mode, however, the CPU is much more involved: the driver has to write the data directly to the disk controller, then polls a register on the controller, in a tight loop, to find out when it's done. If this is what's going on, you'll see a lot of CPU usage in the System process in Task Manager. Your anti-virus package may also be consuming a lot of CPU. See if the CPU usage goes down if you disable the resident part of the antivirus. Otherwise I can't see why there would be a lot of CPU usage just copying a file.
Stability. What an interesting concept. -- Chris Maunder
-
More info needed: How are you copying the file?
Cheers, Sebastian -- "If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
-
Hi, I have a Windows application which actually carries out a file transfer operation from a SCSI device to the local directory. However during the file transfer and DB updates, the CPU usage shoots up to 100%. Can anyone help me in optimizing the CPU usage? Thanks in Advance, KKrista