RAM/CPU usage affecting upload rate...?

I make and upload videos to the delight of many. The videos start out raw and very large, so they must be compressed. I use VirtualDub for this task and with my 512 MB of generic RAM it usually takes about 30-40 seconds per minute to do the job. It isn’t unusual for me to upload the final product and then move on to compressing the next video.

Of course, compressing large videos takes quite a lot of of the computer’s resources; mostly the RAM, I imagine. So why is it that my internet goes down the drain during this process? It feels like I’m on dial-up. I can watch my upload rate on the FTP client (I use Filezilla) drop to a miserable 5kb/s. As soon as the compression is finished it slowly but surely climbs back to the normal 30-35 range.

Now I’m not very saavy on the mechanics of computers and it doesn’t really bother me that much…but that sounds weird to me. What’s going on?

The video compression process is CPU bound–it will always consume 100% CPU if allowed. This makes it more difficult for other processes to get a chance to run. While network activity does not take a great deal of CPU effort, it does need time on the processor and is slowed when the CPU is under heavy load.

Outside of AGP and such, all data travels through the CPU. So if the CPU is busy, everything gets slowed down.

Also, quite often the OS will switch between processes when there is some bit of something that can be done asynchronously. That is, when the CPU wants data from memory, it just grabs it and continues on. While as when it requests data from the hard drive, it sends of a request, and later the hard drive will send back a message saying that it has got some data for the CPU. So during that time, rather than sitting around staring dumbly, usually the OS will switch to a different application.

And since compression will take place almost exclusively just between memory and the CPU (you can fit a lot of data in memory) it will almost never allow for a place for another process to break in. So your internet data is only being allowed to run because there is probably a maximum amount of time any process can run before it gets switched out regardless. At which time the internet connection immediately releases itself as it sends out another data packet.

Virtual Dub has it’s own priority controls, but I usually use the Task Manager to set the apps priority to “BelowNormal” which frees up my Net connection well enough, without impacting too heavily on the speed of the conversion/encoding process.