Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
37afa2eb
Commit
37afa2eb
authored
Jan 23, 2004
by
Robert Ricci
Browse files
When including virt goo, include the nodes' CPU speeds and RAM, which
we can use for fine-tuning packing in assign.
parent
a797b8c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/ptopgen.in
View file @
37afa2eb
...
...
@@ -109,16 +109,20 @@ if (defined($options{"e"})) {
# Read class/type maps
my
$result
=
DBQueryFatal
("
select class,type,delay_capacity,
"
.
"
virtnode_capacity,isvirtnode,simnode_capacity
"
.
"
virtnode_capacity,isvirtnode,simnode_capacity,
"
.
"
speed, RAM
"
.
"
from node_types
");
while
((
$class
,
$type
,
$delaycapacity
,
$virtcapacity
,
$isvirt
,
$simcapacity
)
=
$result
->
fetchrow_array
)
{
$virtcapacity
,
$isvirt
,
$simcapacity
,
$speed
,
$ram
)
=
$result
->
fetchrow_array
)
{
$map
=
{};
$map
->
{'
CLASS
'}
=
$class
;
$map
->
{'
DELAYCAP
'}
=
$delaycapacity
;
$map
->
{'
VIRTCAP
'}
=
$virtcapacity
;
$map
->
{'
SIMCAP
'}
=
$simcapacity
;
$map
->
{'
ISVIRT
'}
=
$isvirt
;
$map
->
{'
SPEED
'}
=
$speed
;
$map
->
{'
RAM
'}
=
$ram
;
$map
->
{'
FEATURES
'}
=
[]
;
$map
->
{'
AUXTYPES
'}
=
{};
$typemap
{
$type
}
=
$map
;
...
...
@@ -255,6 +259,8 @@ foreach $node (keys(%nodes)) {
my
$class
=
$typemap
{
$type
}
->
{'
CLASS
'};
my
$delay_capacity
=
$typemap
{
$type
}
->
{'
DELAYCAP
'};
my
$simnode_capacity
=
$typemap
{
$type
}
->
{'
SIMCAP
'};
my
$cpu_speed
=
$typemap
{
$type
}
->
{'
SPEED
'};
my
$ram
=
$typemap
{
$type
}
->
{'
RAM
'};
my
@types
=
("
$type
:1
");
my
@features
;
...
...
@@ -317,6 +323,11 @@ foreach $node (keys(%nodes)) {
push
@types
,
"
*lan:*
";
# Add trivial bw spec.
push
@flags
,
"
trivial_bw:400000
";
# Add CPU and RAM information
push
@features
,
"
?+cpu:
$cpu_speed
";
push
@features
,
"
?+ram:
$ram
";
# This number can be use for fine-tuning packing
push
@features
,
"
?+virtpercent:100
";
}
if
(
$simstuff
&&
$simnode_capacity
>
0
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment