Re: hibernate vs hibernate-ram ?

2008-04-14 Thread Daniel Tryba
On Sat, Apr 12, 2008 at 03:40:39PM +0200, Hans-J. Ullrich wrote:
> Second question:  Is there a way on a multi processor system to prevent the 
> system to use both cores (yes, I know, can start as a single core machine) 
> and after start up using the second (and now empty cpu) for one process ?

My guess would be to modify /etc/init.d/rcS from
exec /etc/init.d/rc S
to
exec numactl --physcpubind=0 /etc/init.d/rc S
(or better yet to modify the initrd)

The affinity of all subprocesses is inherrited, thus should be bound to
cpu0.

This offcourse will only function on a numa arch. But I guess smp has
similar controls.

-- 

 When you do things right, people won't be sure you've done anything at all.

   Daniel Tryba


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: hibernate vs hibernate-ram ?

2008-04-12 Thread Jochen Schulz
Hans-J. Ullrich:
> 
> May this might not the right list to ask, but can someone tell me the reason, 
> why the command "hibernate" and the command "hibernate-ram" behave 
> different ?

From 'man hibernate':

 If the hibernate script is invoked with a name of the form
 hibernate-foo  then it  will  use  the  configuration  file
 /etc/hibernate/foo.conf instead of the default.

> This is strange, because "hibernate-ram" is just a symlink to "hibernate".

Every UNIX program knows the command line that invoked itself. That way,
a program may behave differently depending on the name of the executable
that has been launched.

> Second question:  Is there a way on a multi processor system to prevent the 
> system to use both cores (yes, I know, can start as a single core machine) 
> and after start up using the second (and now empty cpu) for one process ?

As far as I know, you can only bind specific processed to a specific
CPU. That doesn't prevent other processes from using the same CPU, but
it really shouldn't matter performance-wise. If the process needs 100%
of its CPU's time, it will get it.

J.
-- 
If I could have anything in the world it would have to be more money.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: hibernate vs hibernate-ram ?

2008-04-12 Thread C. Ahlstrom

 Hans-J. Ullrich 15:40 Sat 12 Apr  

Hello !

May this might not the right list to ask, but can someone tell me the reason, 
why the command "hibernate" and the command "hibernate-ram" behave 
different ?


This is strange, because "hibernate-ram" is just a symlink to "hibernate".


That app probably makes decisions based on argv[0].

Second question:  Is there a way on a multi processor system to prevent the 
system to use both cores (yes, I know, can start as a single core machine) 
and after start up using the second (and now empty cpu) for one process ?


My idea was, to start the host system on one cpu, and when it is up, to start 
a virtual machine (in my case "virtualbox") on the other cpu.


Beats me.

Check out schedtool for setting CPU affinity.  Or wait for a more
knowledgable replier. 

--
It has been said [by Anatole France], "it is not by amusing oneself
that one learns," and, in reply: "it is *only* by amusing
oneself that one can learn."
-- Edward Kasner and James R. Newman