Professional Documents
Culture Documents
Gabriel G. Castañé
Why ..
When we simulate ..
To study the behaviour of components that we can
not “see”: biology, chemistry, astrophysics.
To study the behaviour of something without build
it
To test things that we can not reach or it does not
exists
What is iCanCloud?
Scalable to model large distributed system models
Flexible to model different environments
Easy to use with it’s own Graphical User Interface
Portable to let users use their own platform
Configurable to focus experiments in different scopes
Layers structure
iCanCloud is written in C++
iCanCloud has been built on the top of INET and OMNET++
It is an eventbased simulation platform.
Simulation structure
Single Single
module module Parameters file (.ned)
Header file(.h)
Disk CPU
Memory
Simulation structure
Disk c1 c2
Memory
Introduction
Network interface
Network interface
Network interface
Memory Memory
Basic Idea
Basic Idea
Basic Idea
Main components
Main components of a cloud system:
Architecture of iCanCloud
Users
Cloud Manager
Distributed system
Virtualization
Operative System
Energy Consumption
Hardware components
Architecture of iCanCloud
Control Processing Unit
Process Request for computing power:
instructionsPerSecond =((1/current_tick_s.dbl())*ipt)
coreTime = (requestedMI/instructionsPerSecond);
delay(coreTime);
Main Parameters
(.ned):
// Energy parameters
int numDRAMChips; // Chips per card
int numModules; // Number of connected slots
Storage
Main Parameters
(.ned):
double readBandwidth; // Bandwidth (in MB/s) for reads
double writeBandwidth; // Bandwidth (in MB/s) for writes
Users
Cloud Manager
Distributed system
Virtualization
Operative system
Energy Consumption
Hardware components
Power consumption
Power consumption
We have a component with 'n' states..
States S1 S2 S3 S4
.. Sn
Power
Values
W1
P1 W2
P2 W3
P3 W4
P4 .. Wn
Pt
Power consumption
We have a component with 'n' states..
States S1 S2 S3 S4 Sn
Power
P1 P2 P3 P4 Pt
Values
Time t1 t2 t3 t4 tn
Users
Cloud Manager
Distributed system
Virtualization
Operative system
Energy Consumption
Hardware components
Node Structure
GENERIC NODE
Node Structure
GENERIC NODE
Architecture of iCanCloud
Users
Cloud Manager
Distributed system
Virtualization
Operative System
Energy Consumption
Hardware components
Virtualization
Virtual Machines
◍ User applications are executed in VMs
Hypervisor
◍ Each node has its own hypervisor
◍ The hypervisor has a scheduler per HW system
◍ There is an API to program scheduling policies
Virtualization
Main idea of virtualization in iCanCloud:
Architecture of iCanCloud
Users
Cloud Manager
Distributed System
Virtualization
Operative System
Energy Consumption
Hardware components
Build a distributed system
Architecture of iCanCloud
Users
Cloud Manager
Distributed System
Virtualization
Operative System
Energy Consumption
Hardware components
Cloud Manager
Architecture of iCanCloud
Users
Cloud Manager
Distributed System
Virtualization
Operative System
Energy Consumption
Hardware components
Tenant..
A simulated user (tenant) is:
● User behavior defines the
scheduling policy of the user
Users can write their own applications. iCanCloud
provides:
A set of POSIXlike functions
A subset of MPI functions
We have to model the flow of our applications using APIs
System calls API
● // ----------------- CPU ----------------- //
void iCanCloud_request_cpu (MI);
void iCanCloud_request_cpuTime (cpuTime);
// ----------------- Storage----------------- //
void iCanCloud_request_open (fileName);
void iCanCloud_request_close (fileName);
void iCanCloud_request_read (fileName, offset, size);
void iCanCloud_request_write (fileName, offset, size);
void iCanCloud_request_create (fileName);
void iCanCloud_request_delete (fileName);
MPI API
// ---------------- Misc --------------- //
void parseMachinesFile ();
bool isMaster (processRank);
int getMyMaster (processRank);
bool isThisWorkerInMyRange (master, processRank);
2 VMs
2 Cores per VM Cloud Manager
Example of HPC-app scenario
Example (Scenario) :
Cloud Manager
Create 2 VM
Example of HPC-app scenario
Example (Scenario) :
Success
Example of HPC-app scenario
Example (Scenario) :
10.110.2.21
10.110.2.22
Example of HPC-app scenario
Example (Scenario) :
HPC Application
1 process per core 10.110.2.21
10.110.2.22
Example of HPC-app scenario
Example (Scenario) :
Hpc App 2
Hpc App 3
10.110.2.22
Hpc App 4
Example of HPC-app scenario
Example (Scenario) :
MPI config
MPI config
10.110.2.22
MPI config
Example of HPC app parameters
HPC APP .ned looks like
simple ApplicationHPC {
parameters:
bool allToAllConnections; // Connect all processes between themselves
int myRank; // MPI process rank
int workersSet; // Number of worker processes per set
int numIterations; // Number of iterations
// Slice of data sent to each worker process (per iteration)
int sliceToWorkers_KB;
// Slice of data received for master process (per iteration)
int sliceToMaster_KB;
// CPU processing (in MIPS) for each worker process (per iteration)
int sliceCPU;
bool workersRead; // Worker processes read
bool workersWrite; // Worker processes write
}
Map Reduce using HPC-app schema
Output
environment
●
Each application must be rewritten in iCanCloud
Performs Fullsystem simulations
●
CPU are modeled using execution times, not emulating
instructions.
Automatically produce output results
●
Users must specify what results must be calculated
during simulation.
Simulate GPUs and calculate Temperatures of the room
Thanks…
Thanks for
your attention!
/* */ || ¿?
gabriel@arcos.inf.uc3m.es