Jump to content

Dual Core Question


aerogate
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...