Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > why does copying take up so cycles?

why does copying take up so cycles?
Thread Tools
chasg
Grizzled Veteran
Join Date: Mar 2000
Location: London
Status: Offline
Reply With Quote
Dec 17, 2005, 07:50 PM
 
Hi All,

As I sit here with my G5 moving a couple of hundred gigs from one disk to another (internal SATA to external firewire 800) and me unable to really do anything else, I find myself wonder why copying always takes so much of the CPU procesing power. It doesn't matter how big the copy is, the graphs always show extended spikes when OSX is doing copies.

What's up with that, how hard can it be to move bits and record where they're going?

Just buggin' me.

Chas
     
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Dec 17, 2005, 08:07 PM
 
For one thing, the CPU has to translate and buffer the data from the source's buffer to the destination's buffer. Those in and out buffers are not likely to be the same size, and remember that to go to the external drive, the data has to be formated differently from the way it would be if it was just going to another internal drive, so there's the translation.

Glenn -----OTR/L, MOT, Tx
     
Thinine
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Dec 17, 2005, 09:43 PM
 
I've never noticed my large Firewire 400 transfers taking an inordinate amount of CPU. Or large network transfers.
     
msuper69
Professional Poster
Join Date: Jan 2000
Location: Columbus, OH
Status: Offline
Reply With Quote
Dec 17, 2005, 10:46 PM
 
Originally Posted by ghporter
For one thing, the CPU has to translate and buffer the data from the source's buffer to the destination's buffer. Those in and out buffers are not likely to be the same size, and remember that to go to the external drive, the data has to be formated differently from the way it would be if it was just going to another internal drive, so there's the translation.
How do you figure it works that way?

Unless things have changed in the last 10 years or so, the CPU only executes the instruction that tells the disk controller where the data to transfer is located and how many bytes to transfer. The CPU does not take part in the actual data transfer.

Nothing has to be translated. What do you mean?
     
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Dec 17, 2005, 10:51 PM
 
The CPU still has to mediate between the two systems. An external firewire drive has to go through the firewire controller, and the CPU does have to make sure that the process runs, that the buffers don't over or underflow, and that the data outgoing to the firewire controller is properly formed.

I'm not saying that this in itself is what's causing the huge CPU usage, but any data movement from an internal source to an external destination is going to be at least somewhat slower than an equivalent transfer between internal devices.

Glenn -----OTR/L, MOT, Tx
     
Since EBCDIC
Grizzled Veteran
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Jan 11, 2006, 10:00 PM
 
Oh, I am *so* glad someone's mentioned this.

Whenever I copy digital pictures from an SD card (mounted via PCMCIA) my G4 1.5 GHz Al PB comes screaming to a halt. Virtually nothing happens in the Finder GUI during the copy.

My workaround is to clean up the camera just as I join the kids for breakfast. 1 GB 'o pix takes 7 minutes, and I can work normally after the eats are done.

Still, I don't recall this happening before some recent version of Tiger, say three or five months (perhaps).
Since EBCDIC
Using Macs since they were Lisas.
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Jan 11, 2006, 10:41 PM
 
I find that copying large amounts of data over USB makes my system slow to a crawl. FireWire, on the other hand, doesn't seem to be too big a hit.
     
wuzup101
Grizzled Veteran
Join Date: Feb 2003
Status: Offline
Reply With Quote
Jan 12, 2006, 01:12 AM
 
Hum, I've never noticed much of a slowdown while burning DVDs over firewire or transfering large video files to my external HDD via usb2.0. They probably are there, I just never seemed to notice.
Mac: 15" 1.5ghz PB w/ 128mb vid, 5400rpm 80gb, combo drive, 2gb ram
Peripherals: 20gb 4g iPod, Canon i950, Canon S230 "elph", Canon LIDE30, Logitech MX510, Logitech z5500, M-Audio Sonica Theater, Samsung 191T
PC: AMD "barton" XP @ 2.3ghz, 1gb pc3200, 9800pro 128mb, 120gb WD-SE 120gb
Xbox: 1.6, modded with X3 xecuter, slayers evoX 2.6, WDSE 120gb HDD
     
walkerjs
Junior Member
Join Date: Feb 2005
Status: Offline
Reply With Quote
Jan 12, 2006, 11:30 AM
 
I would gather that the slow down isn't because the copy is CPU bound, but rather because it's I/O bound. There are probably plenty of GUI actions that require quite a bit of bandwidth on the data bus which there is plenty of when not copying. When a copy is taking it all up you feel it by slowdowns or outright freezes. I've noted that there are times when CPU is taken up nearly 100% by something (usually firefox back before I went to Safari) and there is no perceptible slowdown of GUI functions even though the CPU is probably glowing red hot.

Burning CDs and DVDs don't slow down the GUI as much because they have a fixed speed at which data can be written, and this probably doesn't take up nearly as much bandwidth because the system has to feed out data at a steady stream, but during a copy from one fast device to another it's pushing as much through as it can sacrificing your other work.
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jan 12, 2006, 11:45 AM
 
Copying uses as many free CPU cycles as it can, so that barring I/O issues the copy can take place as quickly as possible. However, last I checked, copying was not a particularly high-priority task. If almost any other application needs those cycles, the OS will take them from the copy and give them to the app that needs them.

You can test this for yourself, in fact. Start up a CPU-intensive task, such as playing a movie, and watch its CPU usage. While you're doing that, start a large file copy; something that's likely to take a few minutes so you can get a good look over time. The copy is likely to use whatever's available, but it shouldn't take cycles away from the movie, and so there shouldn't be much if any actual slowdown.

Bottom line: yes, the copy takes up many CPU cycles if you're not doing anything else, but since you're not doing anything else that isn't a problem. If you need those cycles for something else, you'll get them.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
JKT
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status: Offline
Reply With Quote
Jan 12, 2006, 12:17 PM
 
Another thing to consider - have the drives been indexed by Spotlight yet? If that is going on at the same time, you are going to see excessive CPU usage. Either exclude the drive from being spotlit if you are constantly changing the data on it, or make sure it is indexed fully.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:05 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,