Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gpucloudsim
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LPDS
gpucloudsim
Commits
bd09bbc0
Commit
bd09bbc0
authored
May 05, 2011
by
Anton Beloglazov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added: 3 power models of IBM servers using the data from SPECpower
parent
0dc399f5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
152 additions
and
4 deletions
+152
-4
PowerModel.java
...n/java/org/cloudbus/cloudsim/power/models/PowerModel.java
+2
-4
PowerModelSpecPower.java
...g/cloudbus/cloudsim/power/models/PowerModelSpecPower.java
+38
-0
PowerModelSpecPowerIbmX3250XeonX3480.java
...im/power/models/PowerModelSpecPowerIbmX3250XeonX3480.java
+20
-0
PowerModelSpecPowerIbmX3550XeonX5670.java
...im/power/models/PowerModelSpecPowerIbmX3550XeonX5670.java
+20
-0
PowerModelSpecPowerIbmX3550XeonX5675.java
...im/power/models/PowerModelSpecPowerIbmX3550XeonX5675.java
+20
-0
PowerModelSpecPowerIbmX3550XeonX5675Test.java
...ower/models/PowerModelSpecPowerIbmX3550XeonX5675Test.java
+52
-0
No files found.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/power/models/PowerModel.java
View file @
bd09bbc0
...
...
@@ -23,11 +23,9 @@ public interface PowerModel {
* according to the power model.
*
* @param utilization the utilization
*
* @return power consumption
*
* @throws Exception the exception
* @throws IllegalArgumentException the illegal argument exception
*/
double
getPower
(
double
utilization
)
throws
Exception
;
double
getPower
(
double
utilization
)
throws
IllegalArgument
Exception
;
}
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/power/models/PowerModelSpecPower.java
0 → 100644
View file @
bd09bbc0
package
org
.
cloudbus
.
cloudsim
.
power
.
models
;
/**
* The abstract class of power models created based on data
* from SPECpower benchmark: http://www.spec.org/power_ssj2008/
*/
public
abstract
class
PowerModelSpecPower
implements
PowerModel
{
/* (non-Javadoc)
* @see org.cloudbus.cloudsim.power.models.PowerModel#getPower(double)
*/
@Override
public
double
getPower
(
double
utilization
)
throws
IllegalArgumentException
{
if
(
utilization
<
0
||
utilization
>
1
)
{
throw
new
IllegalArgumentException
(
"Utilization value must be between 0 and 1"
);
}
if
(
utilization
%
0.1
==
0
)
{
return
getPowerData
((
int
)
(
utilization
*
10
));
}
int
utilization1
=
(
int
)
Math
.
floor
(
utilization
*
10
);
int
utilization2
=
(
int
)
Math
.
ceil
(
utilization
*
10
);
double
power1
=
getPowerData
(
utilization1
);
double
power2
=
getPowerData
(
utilization2
);
double
delta
=
(
power2
-
power1
)
/
10
;
double
power
=
power1
+
delta
*
(
utilization
-
(
double
)
utilization1
/
10
)
*
100
;
return
power
;
}
/**
* Gets the power data.
*
* @param index the index
* @return the power data
*/
protected
abstract
double
getPowerData
(
int
index
);
}
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/power/models/PowerModelSpecPowerIbmX3250XeonX3480.java
0 → 100644
View file @
bd09bbc0
package
org
.
cloudbus
.
cloudsim
.
power
.
models
;
/**
* The power model of an IBM server x3250 (1 x [Xeon X3480 3067 MHz, 4 cores], 8GB).
* http://www.spec.org/power_ssj2008/results/res2010q4/power_ssj2008-20101001-00297.html
*/
public
class
PowerModelSpecPowerIbmX3250XeonX3480
extends
PowerModelSpecPower
{
/** The power. */
private
final
double
[]
power
=
{
42.3
,
46.7
,
49.7
,
55.4
,
61.8
,
69.3
,
76.1
,
87
,
96.1
,
106
,
113
};
/* (non-Javadoc)
* @see org.cloudbus.cloudsim.power.models.PowerModelSpecPower#getPowerData(int)
*/
@Override
protected
double
getPowerData
(
int
index
)
{
return
power
[
index
];
}
}
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/power/models/PowerModelSpecPowerIbmX3550XeonX5670.java
0 → 100644
View file @
bd09bbc0
package
org
.
cloudbus
.
cloudsim
.
power
.
models
;
/**
* The power model of an IBM server x3550 (2 x [Xeon X5670 2933 MHz, 6 cores], 12GB).
* http://www.spec.org/power_ssj2008/results/res2010q2/power_ssj2008-20100315-00239.html
*/
public
class
PowerModelSpecPowerIbmX3550XeonX5670
extends
PowerModelSpecPower
{
/** The power. */
private
final
double
[]
power
=
{
66
,
107
,
120
,
131
,
143
,
156
,
173
,
191
,
211
,
229
,
247
};
/* (non-Javadoc)
* @see org.cloudbus.cloudsim.power.models.PowerModelSpecPower#getPowerData(int)
*/
@Override
protected
double
getPowerData
(
int
index
)
{
return
power
[
index
];
}
}
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/power/models/PowerModelSpecPowerIbmX3550XeonX5675.java
0 → 100644
View file @
bd09bbc0
package
org
.
cloudbus
.
cloudsim
.
power
.
models
;
/**
* The power model of an IBM server x3550 (2 x [Xeon X5675 3067 MHz, 6 cores], 16GB).
* http://www.spec.org/power_ssj2008/results/res2011q2/power_ssj2008-20110406-00368.html
*/
public
class
PowerModelSpecPowerIbmX3550XeonX5675
extends
PowerModelSpecPower
{
/** The power. */
private
final
double
[]
power
=
{
58.4
,
98
,
109
,
118
,
128
,
140
,
153
,
170
,
189
,
205
,
222
};
/* (non-Javadoc)
* @see org.cloudbus.cloudsim.power.models.PowerModelSpecPower#getPowerData(int)
*/
@Override
protected
double
getPowerData
(
int
index
)
{
return
power
[
index
];
}
}
modules/cloudsim/src/test/java/org/cloudbus/cloudsim/power/models/PowerModelSpecPowerIbmX3550XeonX5675Test.java
0 → 100644
View file @
bd09bbc0
/*
* Title: CloudSim Toolkit
* Description: CloudSim (Cloud Simulation) Toolkit for Modeling and Simulation of Clouds
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
*
* Copyright (c) 2009-2010, The University of Melbourne, Australia
*/
package
org
.
cloudbus
.
cloudsim
.
power
.
models
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
org.junit.Before
;
import
org.junit.Test
;
/**
* @author Anton Beloglazov
* @since CloudSim Toolkit 2.0
*/
public
class
PowerModelSpecPowerIbmX3550XeonX5675Test
{
private
PowerModel
powerModel
;
@Before
public
void
setUp
()
throws
Exception
{
powerModel
=
new
PowerModelSpecPowerIbmX3550XeonX5675
();
}
@Test
(
expected
=
IllegalArgumentException
.
class
)
public
void
testGetPowerArgumentLessThenZero
()
throws
IllegalArgumentException
{
powerModel
.
getPower
(-
1
);
}
@Test
(
expected
=
IllegalArgumentException
.
class
)
public
void
testGetPowerArgumentLargerThenOne
()
throws
IllegalArgumentException
{
powerModel
.
getPower
(
2
);
}
@Test
public
void
testGetPower
()
{
assertEquals
(
58.4
,
powerModel
.
getPower
(
0
),
0
);
assertEquals
(
58.4
+
(
98
-
58.4
)
/
5
,
powerModel
.
getPower
(
0.02
),
0
);
assertEquals
(
98
,
powerModel
.
getPower
(
0.1
),
0
);
assertEquals
(
140
,
powerModel
.
getPower
(
0.5
),
0
);
assertEquals
(
189
,
powerModel
.
getPower
(
0.8
),
0
);
assertEquals
(
189
+
0.7
*
10
*
(
205
-
189
)
/
10
,
powerModel
.
getPower
(
0.87
),
0
);
assertEquals
(
205
,
powerModel
.
getPower
(
0.9
),
0
);
assertEquals
(
222
,
powerModel
.
getPower
(
1
),
0
);
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
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