aerogate Posted July 1, 2007 Report Share Posted July 1, 2007 Hi, Just a quick question, does anyone know what logic is applied to dual core cpu usage under Linux. For example, I am right now encoding a video using avidemux, gkrellm is showing each core using 70 percent cpu, this is good, because its fast, yet allows me to use the pc for other things without slowdown. just wondered what logic denotes using 70 percent of each core when using avidemux. Quote Link to comment Share on other sites More sharing options...
iphitus Posted July 1, 2007 Report Share Posted July 1, 2007 A process will only operate on one, unless it's a process with multiple threads. So it's just a matter of tallying up the processor usage of each app, to gain the total for each cpu. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted July 2, 2007 Report Share Posted July 2, 2007 Are you sure about the multi-thread thing? Here at work, we run Sun's Java5 JDK on Redhat on a dual-processor dual-core (total: 4 cores). We have a thread pool hence lots of threads, yet one core shows at roughly 80% while other cores are idle. Same on another server with 4 CPUs (total 8 cores). Yet as far as I know, Java is running with native threads and in server mode... On a different subject, is it possible to force both cores to combine power for a single application. I'd be interested in running mencoder at 90% of both cores instead of a single core. Yves. Quote Link to comment Share on other sites More sharing options...
adamw Posted July 2, 2007 Report Share Posted July 2, 2007 as iphitus said, that would require the mencoder authors to write it to be multi-processor aware. Quote Link to comment Share on other sites More sharing options...
aerogate Posted July 2, 2007 Author Report Share Posted July 2, 2007 as iphitus said, that would require the mencoder authors to write it to be multi-processor aware. Agree, if i run mencoder it uses one cpu core, but have a look at this video encoding a file using avidemux, appears to be using both cores. http://www.mistersend.com/mike/videos/avidemux.mpeg Mike Quote Link to comment Share on other sites More sharing options...
iphitus Posted July 2, 2007 Report Share Posted July 2, 2007 Are you sure about the multi-thread thing?Here at work, we run Sun's Java5 JDK on Redhat on a dual-processor dual-core (total: 4 cores). We have a thread pool hence lots of threads, yet one core shows at roughly 80% while other cores are idle. Same on another server with 4 CPUs (total 8 cores). Yet as far as I know, Java is running with native threads and in server mode... Guess that depends on how it's scheduled. There are ways to tie processes to a particular processor. In this case, it sounds like many of those threads are idle, and what is running, isnt overstressing the active core, so theres no need to schedule it to another. Under linux "threads" are practically seperate processes, except they share some memory with their parent process, thus they may be scheduled to run on any processor. On a different subject, is it possible to force both cores to combine power for a single application. I'd be interested in running mencoder at 90% of both cores instead of a single core. Yves. No. The program needs to be explicitly designed to via the use of threads or multiple processes. You could though, split the movie you want to encode into two pieces, and then have a mencoder process encoding each. Though then you need to find a way to join them. James Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.