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
ad64ecd5
Commit
ad64ecd5
authored
Dec 03, 2018
by
Ahmad Siavashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
power model added
parent
dc418c00
Pipeline
#14
canceled with stages
Changes
7
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
82 additions
and
603 deletions
+82
-603
Lpds.java
...in/java/org/cloudbus/cloudsim/examples/gpu/lpds/Lpds.java
+0
-429
LpdsWorkload.java
...org/cloudbus/cloudsim/examples/gpu/lpds/LpdsWorkload.java
+0
-99
lpds_workload_manifest.json
...us/cloudsim/examples/gpu/lpds/lpds_workload_manifest.json
+0
-72
VideoCardPowerModelLinear.java
.../cloudsim/gpu/power/models/VideoCardPowerModelLinear.java
+78
-0
VideoCardPowerModelNvidiaGridK1.java
...sim/gpu/power/models/VideoCardPowerModelNvidiaGridK1.java
+1
-1
VideoCardPowerModelNvidiaGridK2.java
...sim/gpu/power/models/VideoCardPowerModelNvidiaGridK2.java
+1
-1
RemoteVgpuSchedulerFairShare.java
...bus/cloudsim/gpu/remote/RemoteVgpuSchedulerFairShare.java
+2
-1
No files found.
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/gpu/lpds/Lpds.java
deleted
100644 → 0
View file @
dc418c00
This diff is collapsed.
Click to expand it.
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/gpu/lpds/LpdsWorkload.java
deleted
100644 → 0
View file @
dc418c00
package
org
.
cloudbus
.
cloudsim
.
examples
.
gpu
.
lpds
;
import
java.util.List
;
import
java.util.Map
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
public
class
LpdsWorkload
{
@JsonSerialize
@JsonDeserialize
public
List
<
LpdsDatacenter
>
datacenters
;
@JsonSerialize
@JsonDeserialize
public
Map
<
Integer
,
Integer
>
gpu_cloudlet_vm_map
;
@JsonSerialize
@JsonDeserialize
public
List
<
LpdsGpuCloudlet
>
gpu_cloudlets
;
@JsonSerialize
@JsonDeserialize
public
List
<
LpdsVm
>
vms
;
@JsonSerialize
@JsonDeserialize
public
LpdsBroker
broker
;
}
class
LpdsVgpu
{
public
int
type
;
public
int
memory
;
}
class
LpdsVm
{
public
int
id
;
public
int
num_vcpus
;
public
String
type
;
public
double
ram
;
@JsonSerialize
@JsonDeserialize
public
LpdsVgpu
vgpu
;
}
class
LpdsGpuTask
{
public
int
block_length
;
public
int
num_blocks
;;
public
int
gddram
;
public
String
gddram_utilization_model
;
public
String
gpu_utilization_model
;
}
class
LpdsGpuCloudlet
{
public
int
id
;
public
int
length
;
public
int
num_pes
;
public
String
tag
;
public
String
cpu_utilization_model
;
@JsonSerialize
@JsonDeserialize
public
LpdsGpuTask
gpu_task
;
}
class
LpdsBroker
{
public
String
name
;
}
class
LpdsDatacenter
{
public
String
name
;
public
double
scheduling_interval
;
@JsonSerialize
@JsonDeserialize
public
List
<
LpdsHost
>
hosts
;
public
String
vm_allocation_policy
;
}
class
LpdsHost
{
public
String
type
;
public
int
num_pes
;
public
int
pe_mips
;
public
int
ram
;
public
String
video_card_allocation_policy
;
@JsonSerialize
@JsonDeserialize
public
List
<
LpdsVideoCard
>
video_cards
;
}
class
LpdsVideoCard
{
@JsonSerialize
@JsonDeserialize
public
LpdsGpu
gpu
;
public
int
num_gpus
;
public
String
type
;
public
String
gpu_selection_policy
;
}
class
LpdsGpu
{
public
int
num_pes
;
public
int
gddram
;
public
int
pe_mips
;
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/gpu/lpds/lpds_workload_manifest.json
deleted
100644 → 0
View file @
dc418c00
{
"broker"
:
{
"name"
:
"portal"
},
"datacenters"
:
[
{
"hosts"
:
[
{
"num_pes"
:
40
,
"pe_mips"
:
46400
,
"ram"
:
60
,
"type"
:
"DUAL_INTEL_XEON_E5_2666_V3"
,
"video_card_allocation_policy"
:
"simple"
,
"video_cards"
:
[]
},
{
"num_pes"
:
40
,
"pe_mips"
:
46400
,
"ram"
:
60
,
"type"
:
"DUAL_INTEL_XEON_E5_2666_V3_DUAL_NVIDIA_M60"
,
"video_card_allocation_policy"
:
"simple"
,
"video_cards"
:
[
{
"gpu"
:
{
"gddram"
:
8192
,
"num_pes"
:
16
,
"pe_mips"
:
142592
},
"gpu_selection_policy"
:
"simple"
,
"num_gpus"
:
2
,
"type"
:
"Tesla M60"
}
]
}
],
"name"
:
"DC"
,
"scheduling_interval"
:
1.0
,
"vm_allocation_policy"
:
"simple"
}
],
"gpu_cloudlet_vm_map"
:
{
"0"
:
0
},
"gpu_cloudlets"
:
[
{
"cpu_utilization_model"
:
"high"
,
"gpu_task"
:
{
"block_length"
:
132813
,
"gddram"
:
512
,
"gddram_utilization_model"
:
"medium"
,
"gpu_utilization_model"
:
"low"
,
"num_blocks"
:
128
},
"id"
:
0
,
"length"
:
652977327
,
"num_pes"
:
1
,
"tag"
:
"BFS"
}
],
"vms"
:
[
{
"id"
:
0
,
"num_vcpus"
:
2
,
"ram"
:
3.75
,
"type"
:
1
,
"vgpu"
:
{
"memory"
:
1024
,
"type"
:
null
}
}
]
}
\ No newline at end of file
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/power/models/VideoCardPowerModelLinear.java
0 → 100644
View file @
ad64ecd5
package
org
.
cloudbus
.
cloudsim
.
gpu
.
power
.
models
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
org.cloudbus.cloudsim.gpu.Pgpu
;
/**
* Implements a power model where the power consumption is linear to resource
* usage and frequency.
*
* @author Ahmad Siavashi
*
*/
public
class
VideoCardPowerModelLinear
implements
VideoCardPowerModel
{
private
boolean
powerGate
;
private
double
a3
,
a2
,
a1
,
a0
;
private
int
frequency
;
/**
* A power model where the power consumption is linear to resource usage and
* frequency.
*
* @param frequency
* nominal frequency of the device in MHz
* @param a3
* constant parameter of the model
* @param a2
* constant parameter of the model
*
* @param a1
* constant parameter of the model
*
* @param a0
* constant parameter of the model
*
* @param powerGate
* power gates individual GPUs if they are idle
*/
public
VideoCardPowerModelLinear
(
int
frequency
,
double
a3
,
double
a2
,
double
a1
,
double
a0
,
boolean
powerGate
)
{
this
.
powerGate
=
powerGate
;
this
.
frequency
=
frequency
;
this
.
a3
=
a3
;
this
.
a2
=
a2
;
this
.
a1
=
a1
;
this
.
a0
=
a0
;
}
@Override
public
double
getPower
(
Map
<
Pgpu
,
Double
>
pgpuUtilization
,
Map
<
Pgpu
,
Double
>
gddramUtilization
,
double
bwUtilization
)
{
double
totalVideoCardPower
=
0.0
;
for
(
Entry
<
Pgpu
,
Double
>
entry
:
pgpuUtilization
.
entrySet
())
{
Double
utilization
=
entry
.
getValue
();
double
pgpuPower
=
0.0
;
if
(!
this
.
powerGate
||
this
.
powerGate
&&
utilization
>
0.0
)
{
pgpuPower
=
powerFunction
(
frequency
,
utilization
);
}
totalVideoCardPower
+=
pgpuPower
;
}
return
totalVideoCardPower
;
}
/**
*
* @param f
* pgpu frequency
* @param u
* pgpu utilization
* @return power consumption for the given f and u
*/
protected
double
powerFunction
(
double
f
,
double
u
)
{
u
*=
100
;
double
power
=
a3
*
f
*
u
+
a2
*
f
+
a1
*
u
+
a0
;
return
power
;
}
}
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/power/models/VideoCardPowerModelNvidiaGridK1.java
View file @
ad64ecd5
...
@@ -8,7 +8,7 @@ import org.cloudbus.cloudsim.gpu.Pgpu;
...
@@ -8,7 +8,7 @@ import org.cloudbus.cloudsim.gpu.Pgpu;
import
org.cloudbus.cloudsim.gpu.VideoCardTags
;
import
org.cloudbus.cloudsim.gpu.VideoCardTags
;
/**
/**
* Implements a power model for NVIDIA GRID K1 video card where the power consumption is linear to resource
* Implements a p
rocess variation-aware p
ower model for NVIDIA GRID K1 video card where the power consumption is linear to resource
* usage and frequency.
* usage and frequency.
*
*
* @author Ahmad Siavashi
* @author Ahmad Siavashi
...
...
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/power/models/VideoCardPowerModelNvidiaGridK2.java
View file @
ad64ecd5
...
@@ -8,7 +8,7 @@ import org.cloudbus.cloudsim.gpu.Pgpu;
...
@@ -8,7 +8,7 @@ import org.cloudbus.cloudsim.gpu.Pgpu;
import
org.cloudbus.cloudsim.gpu.VideoCardTags
;
import
org.cloudbus.cloudsim.gpu.VideoCardTags
;
/**
/**
* Implements a power model for NVIDIA GRID K2 video card where the power
* Implements a p
rocess variation-aware p
ower model for NVIDIA GRID K2 video card where the power
* consumption is linear to resource usage and frequency.
* consumption is linear to resource usage and frequency.
*
*
* @author Ahmad Siavashi
* @author Ahmad Siavashi
...
...
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/remote/RemoteVgpuSchedulerFairShare.java
View file @
ad64ecd5
...
@@ -11,6 +11,7 @@ import org.cloudbus.cloudsim.gpu.Pgpu;
...
@@ -11,6 +11,7 @@ import org.cloudbus.cloudsim.gpu.Pgpu;
import
org.cloudbus.cloudsim.gpu.Vgpu
;
import
org.cloudbus.cloudsim.gpu.Vgpu
;
import
org.cloudbus.cloudsim.gpu.VgpuScheduler
;
import
org.cloudbus.cloudsim.gpu.VgpuScheduler
;
import
org.cloudbus.cloudsim.gpu.VgpuSchedulerFairShare
;
import
org.cloudbus.cloudsim.gpu.VgpuSchedulerFairShare
;
import
org.cloudbus.cloudsim.gpu.performance.PerformanceScheduler
;
import
org.cloudbus.cloudsim.gpu.performance.PerformanceVgpuSchedulerFairShare
;
import
org.cloudbus.cloudsim.gpu.performance.PerformanceVgpuSchedulerFairShare
;
import
org.cloudbus.cloudsim.gpu.performance.models.PerformanceModel
;
import
org.cloudbus.cloudsim.gpu.performance.models.PerformanceModel
;
import
org.cloudbus.cloudsim.gpu.selection.PgpuSelectionPolicy
;
import
org.cloudbus.cloudsim.gpu.selection.PgpuSelectionPolicy
;
...
@@ -21,7 +22,7 @@ import org.cloudbus.cloudsim.util.MathUtil;
...
@@ -21,7 +22,7 @@ import org.cloudbus.cloudsim.util.MathUtil;
*
*
* @author Ahmad Siavashi
* @author Ahmad Siavashi
*/
*/
public
class
RemoteVgpuSchedulerFairShare
extends
PerformanceVgpuSchedulerFairShare
{
public
class
RemoteVgpuSchedulerFairShare
extends
PerformanceVgpuSchedulerFairShare
implements
PerformanceScheduler
<
Vgpu
>
{
/**
/**
* Extends {@link VgpuSchedulerFairShare} to add support for GPU remoting.
* Extends {@link VgpuSchedulerFairShare} to add support for GPU remoting.
...
...
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