Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simbricks-website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SimBricks
simbricks-website
Commits
2185eb0e
Commit
2185eb0e
authored
6 months ago
by
Hejing Li
Browse files
Options
Downloads
Patches
Plain Diff
add new blog draft for parallelize existing simulators
parent
8d6bb996
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#107171
passed
6 months ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_posts/2024-09-18-paralellize-using-simbricks.md
+69
-0
69 additions, 0 deletions
_posts/2024-09-18-paralellize-using-simbricks.md
with
69 additions
and
0 deletions
_posts/2024-09-18-paralellize-using-simbricks.md
0 → 100644
+
69
−
0
View file @
2185eb0e
---
title
:
"
Parallelize
Existing
Simulator
with
SimBricks"
subtitle
:
Effectively and Flexibly Divide a Simulator into Parallel Pieces
date
:
2024-09-15
author
:
hejing
permalink
:
/blog/parallelize-using-simbricks.html
card_image
:
TODO
---
SimBricks enables full-system simulation by connecting multiple simulators and
running them in parallel. Thanks to its loosely coupled architecture and
efficient communication mechanisms, the runtime of each simulator overlaps
significantly, making the overall simulation time highly scalable as more
components are added. However, despite this scalability, the simulation time is
still constrained by the slowest component in the system. This bottleneck often
occurs in the host simulator when simulating multiple cores, or in the network
simulator when handling large networks with a high volume of packet generation.
In this blog post, we discuss how SimBricks can be used to parallelize and
accelerate existing simulators, alleviating these bottlenecks. The key idea is
to divide the simulation into smaller pieces that balance the simulation load
based on the natural boundaries in real world, such as the memory bus between
the cores and the rest of the host. And then combine these pieces into a whole
using SimBricks adapters.
# Advantages of SimBricks compared to built-in parallelization solutions
## Parallelize without intrusive change
Parallelizing an existing simulator is
challenging and often requires extensive modifications. However, with SimBricks'
modular architecture, simulations can be easily divided along natural
boundaries, such as Ethernet links or memory buses. By simply attaching a
lightweight SimBricks adapter to each piece, it can be seamlessly connected to
its peers, streamlining the process.
## Scalable synchronization of processes
Most simulators are discrete event-driven
simulators (DES). The main reason for the slowness of existing DES is the
sequential nature of event processing. All generated events must be processed in
chronological order, creating strong dependencies between them. Even if events
are distributed across multiple queues and handled by individual threads, the
cost of synchronizing these queues is high, which limits parallelization. With
SimBricks synchronization[link], each process only needs to synchronize with its
peer. By incorporating the modeled latency between components, processes do not
need to synchronize in lockstep, reducing the overhead of synchronization and
improving efficiency.
## Efficient communication channel
Some simulators, such as ns-3, offer a way to
run simulations across multiple processes using Message Passing Interface (MPI)
for communication and synchronization. In contrast, SimBricks implements
efficient message passing through optimized shared memory queues[link]. This
approach minimizes potential slowdowns during communication between different
components, significantly improving performance.
# Example of parallelizing the existing simulators using SimBricks
As an example,
we parallelized a gem5 process to simulate a host with multiple cores. In the
original configuration, all components run within a single process. Since core
simulation consumes most of the time, the overall simulation time increases as
more cores are added. To parallelize gem5, we separated each core and its
on-chip caches from the rest of the system, assigning them to individual
processes. The remaining system was placed in a separate process. Using
SimBricks adapters, we then combined these components into the same architecture
as before. This approach significantly improved simulation speed and scalability
as the number of cores increased.
If you are curious about more detail of parallelizing simulators using
simbricks, don’t hesitate to
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment