# Thread Count Scaling Part 4. CloverLeaf and CPython

DevFeed: [Thread Count Scaling Part 4. CloverLeaf and CPython](<https://devfeed.tech/articles/thread-count-scaling-part-4-cloverleaf-and-cpython-13643.md>)

Original publisher: [Read original article](<https://easyperf.net/blog/2024/05/10/Thread-Count-Scaling-Part4>)

Author: Denis Bakhvalov

Published: 2024-05-10T04:00:00Z

Content type: article

Language: en

Sources: [Denis Bakhvalov](<https://devfeed.tech/sources/denis-bakhvalov.md>)

Topics: [benchmarking](<https://devfeed.tech/topics/benchmarking.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [book-chapters](<https://devfeed.tech/tags/book-chapters.md>), [case-study](<https://devfeed.tech/tags/case-study.md>), [dram](<https://devfeed.tech/tags/dram.md>), [hpc](<https://devfeed.tech/tags/hpc.md>), [memory](<https://devfeed.tech/tags/memory.md>), [metric](<https://devfeed.tech/tags/metric.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-analysis](<https://devfeed.tech/tags/performance-analysis.md>), [scale](<https://devfeed.tech/tags/scale.md>), [speed](<https://devfeed.tech/tags/speed.md>), [thread](<https://devfeed.tech/tags/thread.md>)

## AI overview

The article examines CloverLeaf and CPython thread-count scaling. It reports that CloverLeaf performance stops increasing after three threads because memory bandwidth becomes the limiting factor. Replacing two memory modules with faster DDR4 modules improves performance by 10% to 33% as thread count increases.

## Source excerpt

Subscribe to my newsletter, support me on Patreon, Github, or by PayPal donation. This blog is an excerpt from the book. More details in the introduction. CloverLeaf is a hydrodynamics workload. We will not dig deep into the details of the underlying algorithm as it is not relevant to this case study. CloverLeaf uses OpenMP to parallelize the workload. Similar to other HPC workloads, we should expect CloverLeaf to scale well.