Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. CPU usage during File Transfer

CPU usage during File Transfer

Scheduled Pinned Locked Moved System Admin
databasehelpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KKrista
    wrote on last edited by
    #1

    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

    S M C 3 Replies Last reply
    0
    • K 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

      S Offline
      S Offline
      Sebastian Schneider
      wrote on last edited by
      #2

      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

      K 1 Reply Last reply
      0
      • K 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

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • S Sebastian Schneider

          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

          K Offline
          K Offline
          KKrista
          wrote on last edited by
          #4

          I am using an API call to do the file transfer..

          1 Reply Last reply
          0
          • K 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

            C Offline
            C Offline
            Craster
            wrote on last edited by
            #5

            Immediate suspect would be an on-access AV scanner - check what happens if you add in an exclusion for that file location in your AV app, if you have one running.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups