Why different CPU count from nproc and nproc --all in OpenVZ container?
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I'm trying nproc
and nproc --all
in an OpenVZ container to count the number of CPU threads assigned to the vps by upstream provider. While nproc
resulting 1, nproc --all
resulting 24 CPU threads. May anyone please help me in explaining this?
The upstream provider is supposed to assign only one CPU and cat /proc/cpuinfo
is also saying that. Then from where and how this 24 is coming?
Please find a screenshot here https://prnt.sc/hfzeuw. I'm using CentOS 7
inside the vps.
cpu openvz
add a comment |Â
up vote
3
down vote
favorite
I'm trying nproc
and nproc --all
in an OpenVZ container to count the number of CPU threads assigned to the vps by upstream provider. While nproc
resulting 1, nproc --all
resulting 24 CPU threads. May anyone please help me in explaining this?
The upstream provider is supposed to assign only one CPU and cat /proc/cpuinfo
is also saying that. Then from where and how this 24 is coming?
Please find a screenshot here https://prnt.sc/hfzeuw. I'm using CentOS 7
inside the vps.
cpu openvz
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I'm trying nproc
and nproc --all
in an OpenVZ container to count the number of CPU threads assigned to the vps by upstream provider. While nproc
resulting 1, nproc --all
resulting 24 CPU threads. May anyone please help me in explaining this?
The upstream provider is supposed to assign only one CPU and cat /proc/cpuinfo
is also saying that. Then from where and how this 24 is coming?
Please find a screenshot here https://prnt.sc/hfzeuw. I'm using CentOS 7
inside the vps.
cpu openvz
I'm trying nproc
and nproc --all
in an OpenVZ container to count the number of CPU threads assigned to the vps by upstream provider. While nproc
resulting 1, nproc --all
resulting 24 CPU threads. May anyone please help me in explaining this?
The upstream provider is supposed to assign only one CPU and cat /proc/cpuinfo
is also saying that. Then from where and how this 24 is coming?
Please find a screenshot here https://prnt.sc/hfzeuw. I'm using CentOS 7
inside the vps.
cpu openvz
edited Nov 27 '17 at 18:17
asked Nov 27 '17 at 18:02
Abhik Bose
1,5341217
1,5341217
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.
From the man page:
nproc - print the number of processing units available
nproc [OPTION]...
--all print the number of installed processors`
Hope this helps!
EDIT:
What happens when you type the following:
[user@host]$ getconf _NPROCESSORS_ONLN
?
1
getconf _NPROCESSORS_ONLN
returning to 1
â Abhik Bose
Nov 27 '17 at 19:38
As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
â kilrainebc
Nov 27 '17 at 19:53
More than happy! :) Good luck!
â kilrainebc
Nov 27 '17 at 20:27
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.
From the man page:
nproc - print the number of processing units available
nproc [OPTION]...
--all print the number of installed processors`
Hope this helps!
EDIT:
What happens when you type the following:
[user@host]$ getconf _NPROCESSORS_ONLN
?
1
getconf _NPROCESSORS_ONLN
returning to 1
â Abhik Bose
Nov 27 '17 at 19:38
As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
â kilrainebc
Nov 27 '17 at 19:53
More than happy! :) Good luck!
â kilrainebc
Nov 27 '17 at 20:27
add a comment |Â
up vote
2
down vote
accepted
They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.
From the man page:
nproc - print the number of processing units available
nproc [OPTION]...
--all print the number of installed processors`
Hope this helps!
EDIT:
What happens when you type the following:
[user@host]$ getconf _NPROCESSORS_ONLN
?
1
getconf _NPROCESSORS_ONLN
returning to 1
â Abhik Bose
Nov 27 '17 at 19:38
As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
â kilrainebc
Nov 27 '17 at 19:53
More than happy! :) Good luck!
â kilrainebc
Nov 27 '17 at 20:27
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.
From the man page:
nproc - print the number of processing units available
nproc [OPTION]...
--all print the number of installed processors`
Hope this helps!
EDIT:
What happens when you type the following:
[user@host]$ getconf _NPROCESSORS_ONLN
?
They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.
From the man page:
nproc - print the number of processing units available
nproc [OPTION]...
--all print the number of installed processors`
Hope this helps!
EDIT:
What happens when you type the following:
[user@host]$ getconf _NPROCESSORS_ONLN
?
answered Nov 27 '17 at 19:26
kilrainebc
363
363
1
getconf _NPROCESSORS_ONLN
returning to 1
â Abhik Bose
Nov 27 '17 at 19:38
As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
â kilrainebc
Nov 27 '17 at 19:53
More than happy! :) Good luck!
â kilrainebc
Nov 27 '17 at 20:27
add a comment |Â
1
getconf _NPROCESSORS_ONLN
returning to 1
â Abhik Bose
Nov 27 '17 at 19:38
As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
â kilrainebc
Nov 27 '17 at 19:53
More than happy! :) Good luck!
â kilrainebc
Nov 27 '17 at 20:27
1
1
getconf _NPROCESSORS_ONLN
returning to 1â Abhik Bose
Nov 27 '17 at 19:38
getconf _NPROCESSORS_ONLN
returning to 1â Abhik Bose
Nov 27 '17 at 19:38
As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
â kilrainebc
Nov 27 '17 at 19:53
As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
â kilrainebc
Nov 27 '17 at 19:53
More than happy! :) Good luck!
â kilrainebc
Nov 27 '17 at 20:27
More than happy! :) Good luck!
â kilrainebc
Nov 27 '17 at 20:27
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407340%2fwhy-different-cpu-count-from-nproc-and-nproc-all-in-openvz-container%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password