Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Force app to use single CPU
@ 2000-01-18 23:14 Blake Carlson
  2000-01-18 23:11 ` Greg Lindahl
  2000-01-19 15:13 ` Sean Hunter
  0 siblings, 2 replies; 6+ messages in thread
From: Blake Carlson @ 2000-01-18 23:14 UTC (permalink / raw)
  To: axp-list

Hello all -

I have an imaging app (uses ~500MB of memory) running on my DP264
(Linux 2.2.10) that seems to spend a lot of time context switching between
the processors (judging from xosview).  If I change the priority of the
app, I can get it to stick on one processor longer before context
switching out (no big surprise there).

Would I see a _significant_ difference in performance if I was able to
force the app to stick to one CPU all of the time (forcing all other
processes to run on the second processor)?  Could I get two copies of the
program running at the same time to stick to a single CPU and not context
switch? (runtime for the program is about 1 hour)

What is the best way to do this.  'nice -20 app' as root? 


Thanks for your help -

Blake Carlson
blake-carlson@uiowa.edu
College of Electrical & Computer Engineering
University of Iowa
 


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Force app to use single CPU
@ 2000-01-19 11:34 Jakma, Paul
  2000-01-19 16:44 ` Wes Bauske
  0 siblings, 1 reply; 6+ messages in thread
From: Jakma, Paul @ 2000-01-19 11:34 UTC (permalink / raw)
  To: 'axp-list@redhat.com'

> that seems to spend a lot of time context 
> switching between
> the processors (judging from xosview). 

or maybe a case of the observed system being influenced by the measuring
tool?

ie xosview needs cpu time aswell. (and quite a lot of it).

consider the unobserved system, where your app and the X server are the main
loads. The linux scheduler will correctly try to keep X on one cpu, and your
app on the other.

Now introduce xosview. You have 3 processes fighting for cpu_time, and only
2 cpu's. The linux scheduler will still try maintain cpu affinity, but if a
cpu becomes free, there's no point in wasting that slot.  

what you are seeing is correct scheduler behaviour.

regards,

paul jakma. 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-01-19 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-18 23:14 Force app to use single CPU Blake Carlson
2000-01-18 23:11 ` Greg Lindahl
2000-01-18 23:46   ` Blake Carlson
2000-01-19 15:13 ` Sean Hunter
  -- strict thread matches above, loose matches on Subject: below --
2000-01-19 11:34 Jakma, Paul
2000-01-19 16:44 ` Wes Bauske

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox