taskset for smp

2012-06-07 Thread Han Boetes
Hi,

I just ran a script converting a bunch of files to mp3 and since I have
a 8 core machine now I'd like to make my little script multi-threaded.
So each resulting lame process will go to another core.

When I ran the script I noticed that all processes ended up being run on
the same processor. The next instance of the script also ran on the same
processor. It was nu until I started a new shell they moved to another
processor.

So apparently each process and all it's children are being run on the
same processor. Is that by design?

Is there a setting which changes this behaviour so each child process
goes to a random core?

Would it be nice if there was a program like taskset which enables you
to move processes to other cores?

http://linuxcommand.org/man_pages/taskset1.html



# Han
-- 
Please CC me since I am not subscribed to this list.



Re: taskset for smp

2012-06-07 Thread Theo de Raadt
  Would it be nice if there was a program like taskset which enables you
  to move processes to other cores?
 
 No.

Let me be more clear on what Philip is saying by asking some
questions.

Can only root move programs to different processors via this program?

Or can any user move their own or other programs to different processors?

In the first instance, it is useless and unusable.  In the second
instance, please give me an account on an important box so that I can
demonstrate the security impact to you...

The scheduler must try to do the best.  Yes, we know -- the scheduler
does a poor job at the moment...

Never let root try to do a job the operating system should do itself.
Furthermore, never let a user try to do it, either.  Unless you prefer
a system you never let people onto.  And if that is your use case, you
are better off choosing something which has infinite flexibility, and
then disconnecting it from the net.