Skip to content

Using Free Cloud Resources for Running Huge ns-3 Simulations

This article shows the possibility of installing and running ns-3 network simulations using Cloud Computing. Specifically, this article introduces the way to use the free cloud resources provided by Kaggle and Colab to install and run ns-3 and do simulations on the cloud.

Cloud Computing

Cloud computing is the delivery of computing services–including servers, storage, databases, networking, software, analytics, and intelligence–over the Internet (“the cloud”). Instead of buying, owning, and maintaining physical computers, laptops, servers and other IT infrastructure, businesses and organizations can access these resources as needed, paying only for what they use.

There are some benefits of cloud computing:

Scalability: Cloud computing is scalable, meaning that you can easily add or remove resources as needed. This is important for businesses that experience fluctuating demand.
Cost-effectiveness: Cloud computing can be more cost-effective than traditional on-premises IT, especially for businesses with fluctuating demand.
Security: Cloud providers offer a high level of security, as they have the resources and expertise to protect your data.
Reliability: Cloud providers offer a high level of reliability, as they have multiple data centers and redundant systems in place.
Accessibility: Cloud computing is accessible from anywhere with an internet connection. This makes it a good option for businesses with remote employees.

The following are the three main types of cloud computing:

Public cloud: Public cloud is the most common type of cloud computing. It is a shared resource that is available to anyone who wants to use it.
Private cloud: Private cloud is a cloud that is dedicated to a single organization. It is more secure and reliable than public cloud, but it is also more expensive.
Hybrid cloud: Hybrid cloud is a combination of public cloud and private cloud. It allows businesses to get the best of both worlds.

Kaggle and Google Colab are the two publicly available cloud services that anyone can use free of cost. Both are great resources for data scientists and machine learning practitioners. However, they have different strengths and weaknesses.

Kaggle is a platform for data scientists and machine learning practitioners to find and publish datasets, collaborate on projects, and compete in competitions. It has a large library of datasets, a forum for discussion, and a variety of features that make it a valuable resource for these professionals. In addition to that, Kaggle allows you to run Jupyter notebooks in your browser.

Colab is a cloud-based platform that allows you to run Jupyter notebooks in your browser. It is free to use and does not require any setup. This makes it a great option for beginners and for those who want to experiment with data science and machine learning without having to install software on their own computers.

 

Features of Kaggle and Google Colab

The following table shows the key features of Kaggle and Colab so that one can opt to use ns-3 on cloud:

Feature Kaggle Colab
Platform Data science and machine learning platform with Cloud-based Jupyter Notebook environment Cloud-based Jupyter Notebook environment provided by Google
Cost Free Free for personal use, paid plans for commercial use
Datasets Large library of datasets None, but one can upload their own datasets
Features Forum, competitions, kernels, notebooks and Jupyter notebooks Jupyter notebooks
Ease of use More user-friendly More user-friendly
Persistent Storage Available Google Drive can be used as a Persistent Storage
Processors CPUs, GPUs and TPUs CPUs, GPUs and TPUs
RAM (free tire) 30 GB 12 GB
Approximate Free Storage 70 GB 100 GB
Internet Access Available Available
Schedule a notebook to run
Available Not Available
Available Runtime Types Python, R Python, R
cmake compile speed of ns-3 (CPU) Much Faster than Colab Slower than compiling with Native CPU Hardware
Analysis of ns-3 traces Possible with the available tools of Jupyter Notebooks. Possible with the available tools of Jupyter Notebooks.
Network Visualization. No Obvious way to use GUI Visualization tools such as NetAnim. But one can download the NetAnim XML trace file output and can visualize it using natively running NetAnim software. No Obvious way to use GUI Visualization tools such as NetAnim. But one can download the NetAnim XML trace file output and can visualize it using natively running NetAnim software.

 

Installing and Running ns-3 on Cloud

The following article presents a step-by-step procedure for installing and running ns-3 network simulations using the free resources provided by Kaggle Cloud Platform. The Complete Notebook file of this procedure can be downloaded from [4] and can be imported into your Kaggle account for easy installation of ns-3 on Kaggle.

Installing and running ns-3 using free Kaggle Cloud Platform

The following article presents a step-by-step procedure for installing and running ns-3 network simulations using the free resources provided by Google Colab Cloud Platform. The Complete Notebook file of this procedure can be downloaded from [5] and can be imported into your Google Colab for easy installation of ns-3 on Colab.

Installing and running ns-3 using free Colab Cloud Platform

Conclusion

This article shows the way to use the free computing and storage resources of Kaggle and Google Colab for doing ns-3 simulations. Even though the overall compile time was not good, it is possible to use it for running a large simulation (that may take, for example, 10 hours of CPU time).  It is possible to run a batch of simulations remotely using these two free cloud resources.

In fact, there is no simple way to run Network Animations such as NetAnim through this facility and visualize the simulation output. However, it is possible to do quality analysis and produce graphs using the available tools of Jupyter Notebooks.

References

  1. https://www.kaggle.com/code
  2. https://colab.research.google.com/
  3. https://www.nsnam.org/releases/ns-allinone-3.37.tar.bz2
  4. https://github.com/igs3000/ns-3-Turotials/blob/main/installing-ns-3-on-kaggle.ipynb
  5. https://github.com/igs3000/ns-3-Turotials/blob/main/installing-ns-3-on-google-colab.ipynb
WhatsApp Discuss Through WhatsApp