Page 1 of 1

Low CPU usage while converting files

Posted: Wed Feb 19, 2014 9:55 pm
by 2mg
Hi,

I was converting some mp3s to ogg, and I've noticed that Audacity doesn't utilize CPU, which I presume takes the conversion longer to complete.

I'm not sure, nor does it matter is Audacity is now a multicore program, the point is that not even at least one core is used to full extent.

Is there a way to tell/allow Audacity to use at least one core maximally?

Re: Low CPU usage while converting files

Posted: Wed Feb 19, 2014 10:06 pm
by kozikowski
How much memory do you have?
Koz

Re: Low CPU usage while converting files

Posted: Wed Feb 19, 2014 11:12 pm
by 2mg
8gig, about 6gb free when idle DDR3 1600mhz, i5 3.2/6ghz Quad cpu, SSD disk where temp folder is located and Audacity installed. Turned off swap/page file.

Re: Low CPU usage while converting files

Posted: Wed Feb 19, 2014 11:26 pm
by DVDdoug
Most-likely, the CPU is NOT the bottleneck for this particular process on your particular computer. It's probably disk access/transfer speed.

When converting (or rendering) you can sometimes double the speed (or almost double the speed) by using two hard drives, reading from one hard drive and writing to the other. That way, the read/write head doesn't have jump back-and-forth between the reading & writing locations and it doesn't have to switch between reading & writing.

But even with multiple drives, everything has to share the same data bus.

Re: Low CPU usage while converting files

Posted: Thu Feb 20, 2014 12:54 am
by kozikowski
SSD disk where temp folder is located
So that takes care of the drive armature hunt problem.
Koz

Re: Low CPU usage while converting files

Posted: Thu Feb 20, 2014 1:19 am
by steve
2mg wrote:I was converting some mp3s to ogg, and I've noticed that Audacity doesn't utilize CPU
Audacity is not designed as a "format converter". It is designed as a "multi-track audio editor". The relevance of this is that for it's design goal it works internally with uncompressed 32 bit audio data. Audacity does not directly edit or convert files, it works with "projects".

When an audio file is brought into Audacity ("Imported"), the audio data is copied as 32 bit float PCM data. This allows efficient high quality editing and processing.
To create an audio file ("Export"), the audio data from the project is copied to the new file.
Importing and Exporting may require encoding/decoding of the audio data.

The amount of data in uncompressed form within an Audacity project can be 20 x greater than a compressed audio file format. Importing a 100 MB MP3 file can expand to over 2GB of uncompressed audio data. This is not a fast or efficient way to transcode from one file format to another, but that is not the primary objective for Audacity.

Currently Audacity can only use one core at a time, but as you say, it seems unlikely that that is the bottleneck.

Re: Low CPU usage while converting files

Posted: Thu Feb 20, 2014 2:14 am
by 2mg
kozikowski wrote:
SSD disk where temp folder is located
So that takes care of the drive armature hunt problem.
Koz
It's a really fast disk with fast write/read/IOps, so I really don't believe that temp folder/disk is the problem here. Also, there's a lot of RAM, especially since my PC doesn't use pagefile...

Or did you mean something else?
steve wrote:Audacity is not designed as a "format converter". It is designed as a "multi-track audio editor". The relevance of this is that for it's design goal it works internally with uncompressed 32 bit audio data. Audacity does not directly edit or convert files, it works with "projects".

When an audio file is brought into Audacity ("Imported"), the audio data is copied as 32 bit float PCM data. This allows efficient high quality editing and processing.
To create an audio file ("Export"), the audio data from the project is copied to the new file.
Importing and Exporting may require encoding/decoding of the audio data.

The amount of data in uncompressed form within an Audacity project can be 20 x greater than a compressed audio file format. Importing a 100 MB MP3 file can expand to over 2GB of uncompressed audio data. This is not a fast or efficient way to transcode from one file format to another, but that is not the primary objective for Audacity.
Well, that sheds some light, however I'd expect a bit more hardware usage.
steve wrote:Currently Audacity can only use one core at a time, but as you say, it seems unlikely that that is the bottleneck.
True. Maybe I should turn pagefile back on (that's the only "odd" thing about my PC), it would sit on SSD anyway, but I really doubt that is the problem, in fact, I presume it pushes programs to use RAM as much as possible.

I've seen a LAME/MP3 encoder around here that is written for multicore purpose, but I don't see the point, since I saw only 25% usage on 1 core...

Re: Low CPU usage while converting files

Posted: Fri Feb 21, 2014 3:33 am
by DVDdoug
FYI - The CPU is never truly "idiling" unless it's in a sleep mode or low-power mode. When there's nothing to do, or when it's waiting for data or user input it's still running full speed executing NOPs ("no operation" commands.)