Multithreading – How we made the world’s fastet Network Planning tool even faster

Plane taking off

In addition to transparency and accuracy, the evaluation of new routes is primarily about speed: changes in the market must be responded to quickly, new routes must be evaluated at record speed. Of course this requires the use of modern technology. In this blog I will explain what Multithreading is and how our NetLine/Plan customers benefit from it.

Multithreading – How we made the world’s fastet Network Planning tool even faster

In addition to transparency and accuracy, the evaluation of new routes is primarily about speed: changes in the market must be responded to quickly, new routes must be evaluated at record speed.

The implemented network planning tools calculate 5-8 million travel itineraries in the framework of a complete network evaluation. This requires high CPU performance and a memory of 8-10 GB RAM. For comparison: For common office applications only a few megabytes of main memory are needed.

 

The calculation of individual data sets is time-consuming

Now let us imagine that the calculation of the individual itineraries is done step by step. During my research, I came across the Youtube Channel of Udacity and found a very nice explanation. It is like using a newspaper: First your husband reads the sports section. Afterwards you inform yourself about the current events in the business section. And much later, your children may still be studying the television program. Would it not be better to divide the newspaper up so that all readers can read their affected section at the same time?

 

What is a thread?

To continue here, we need to understand what a thread and what a process is. Threads are independent activities or execution strings in a process that are handled independently of other process parts.

Within a process, threads share processing power, memory and other operating system resources such as files and network connections. In our example, the threads would be the reading of the different newspaper sections.

In terms of network planning a thread is a single O&D calculation. All threads run through the same code simultaneously.

 

What is a process?

A process consists of the program flow including the states of all threads. In network planning, the Connection Builder can be a process.

 

One CPU, several threads

Modern processors (CPUs) consist of up to 8 CPU cores. However, often only one thread is started at the same time. As a result, not the full CPU capacity (depending on the number of CPU cores) is used.

Multithreading allows us to run multiple threads on one CPU. Parallelism increases the execution speed of NetLine/Plan (depending on the number of threads used) by up to 100%.

 

 

If you would like to learn more about multithreading in our network planning solution, please contact me.

 

*Image: NetLine/Plan Key Visual, 123 RF

*Inspiration for Mutithreading explanation: Udacity on YouTube, https://www.youtube.com/watch?v=O3EyzlZxx3g

 

Leave a comment

Mandatory input is marked *. Your email address will not be published.

Kontakt