I noticed this when I was watching a video and it started lagging just before until shortly after a download finished. The second time I monitored it using top
and the cpu rises above 100%.
My processor isn't a slow one (Intel Core i7-3630QM Quad Core), and the "average" CPU usage of Transmission is 3% - 4%.
I was wondering what the cause of this curiosity is and what I could do about it (besides using another bit-torrent client).
Generally when ever you are trying to watch a video , your video player will take some time to load the required libraries to play the video and video can be played properly after proper decoding. So what ever the short lagging you are feeling due to Loading of video libraries and decoding of your video to play.
while doing the any data operations CPU will consume its maximum free memory. So when ever your Transmission had completed the download it needs to check the data before displaying the status as Completed.
I think for those two situations that explanation can help you to understand the issue,:)
My guess is the same reason deluge (another torrent client) does the same thing. When it finishes a download, it uses hash algorithms to check the files integrity and make sure the downloaded file is fine. In other words, it checks the file downloaded is 100% the same than in the other clients. Hashing is a CPU expensive process, specially if we're dealing with larger files. In my case a have an intel i3 (not top of the line, but a fairly good CPU) and it takes about 1 minute per GB to check. It may also depend on the amount of files, since the hashing is done par file (if you have a few GB of many small archives it would take longer). I wouldn't worry about it, it's a nice feature of the bittorrent protocol and it doesn't pay disabling it (you may end up with non working isos and broken video files).
Hope it helps.
Most computers these days use CPU interrupts for the disk controller. When Transmission is finishing a transfer all the unwritten parts of the file(s) are then written to disk all at the same time. This uses more CPU as the disk gets super busy doing all those writes.