Discussion:
Making Xen utilize all cores
Mayuresh
2014-08-29 03:32:34 UTC
Permalink
This is on NetBSD 6.1 i386 Dom0 and Linux DomU.

The CPU column shows only 2 CPUs. This is actually a quad core processor.

# xl vcpu-list
Failed to read config file: /usr/pkg/etc/xen/xl.conf: No such file or
directory
Name ID VCPU CPU State Time(s) CPU
Affinity
Domain-0 0 0 0 r-- 383.8 any cpu
Domain-0 0 1 - --p 0.0 any cpu
Domain-0 0 2 - --p 0.0 any cpu
Domain-0 0 3 - --p 0.0 any cpu
domu-linux 1 0 3 -b- 121.2 any cpu

Shouldn't Xen be using all CPUs by default? What setting am I missing to
make Xen do so?

Mayuresh.
Niels Dettenbach (Syndicat IT&Internet)
2014-08-29 05:58:26 UTC
Permalink
Post by Mayuresh
The CPU column shows only 2 CPUs. This is actually a quad core
processor.
hmmm,

as far as i can read there is no anomaly.

i read there:

VCPU: 0-3 (4 cores)
CPU: any CPU (could run on each core) - this is usual as long as you did not pin any cpu to dom0 or domU's explicitely.

hth
cheerioh,


Niels.
--
Niels Dettenbach
Syndicat IT&Internet
http://www.syndicat.com
Mayuresh
2014-08-29 06:30:22 UTC
Permalink
Post by Niels Dettenbach (Syndicat IT&Internet)
Post by Mayuresh
The CPU column shows only 2 CPUs. This is actually a quad core processor.
hmmm,
as far as i can read there is no anomaly.
VCPU: 0-3 (4 cores)
CPU: any CPU (could run on each core) - this is usual as long as you did not pin any cpu to dom0 or domU's explicitely.
Yes, but "any CPU" is limited to those listed in CPU column.

See http://wiki.xen.org/wiki/Tuning_Xen_for_Performance#Dom0_vCPUs for
example. Here CPU 0,1,2,3 appear. In my output only 0 and 3 do.

Further, I have CPU bound load test scripts. If I launch 2 of them
simultaneously, they get 50% CPU (not 100% which I get when I start
without xen) and take real time which is double the cpu time to finish.

Mayuresh.
Manuel Bouyer
2014-08-29 06:50:01 UTC
Permalink
Post by Mayuresh
This is on NetBSD 6.1 i386 Dom0 and Linux DomU.
The CPU column shows only 2 CPUs. This is actually a quad core processor.
# xl vcpu-list
Failed to read config file: /usr/pkg/etc/xen/xl.conf: No such file or
directory
Name ID VCPU CPU State Time(s) CPU
Affinity
Domain-0 0 0 0 r-- 383.8 any cpu
Domain-0 0 1 - --p 0.0 any cpu
Domain-0 0 2 - --p 0.0 any cpu
Domain-0 0 3 - --p 0.0 any cpu
domu-linux 1 0 3 -b- 121.2 any cpu
Shouldn't Xen be using all CPUs by default? What setting am I missing to
make Xen do so?
NetBSD/Xen can't use more than one CPU at this time, the backend drivers
are not SMP-safe. A NetBSD domU can use multiple CPUs.
--
Manuel Bouyer <***@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
John Nemeth
2014-08-29 07:42:06 UTC
Permalink
On Aug 29, 9:02am, Mayuresh wrote:
}
} This is on NetBSD 6.1 i386 Dom0 and Linux DomU.
}
} The CPU column shows only 2 CPUs. This is actually a quad core processor.
}
} # xl vcpu-list
} Failed to read config file: /usr/pkg/etc/xen/xl.conf: No such file or
} directory
} Name ID VCPU CPU State Time(s) CPU
} Affinity
} Domain-0 0 0 0 r-- 383.8 any cpu
} Domain-0 0 1 - --p 0.0 any cpu
} Domain-0 0 2 - --p 0.0 any cpu
} Domain-0 0 3 - --p 0.0 any cpu
} domu-linux 1 0 3 -b- 121.2 any cpu
}
} Shouldn't Xen be using all CPUs by default? What setting am I missing to

Yes.

} make Xen do so?

NetBSD dom0 isn't SMP capable at this time, so it can't use
more then core. To make it do so, you would have to make the
backend drivers MPSAFE. NetBSD domU can use up to 256 cores. You
just have to specify "vcpus = <n>" in the domain configuration file
to allow any domU to use more then one core.

}-- End of excerpt from Mayuresh

Loading...