# How to understand thread count as reported by versioninfo()?

**URL:** <https://discourse.julialang.org/t/how-to-understand-thread-count-as-reported-by-versioninfo/108289>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 3, 2024, 9:11am UTC](https://discourse.julialang.org/t/how-to-understand-thread-count-as-reported-by-versioninfo/108289 "2024-01-03T09:11:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vnegi10](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vnegi10/32/205882_2.png) [@vnegi10](https://discourse.julialang.org/u/vnegi10)\
**Post date:** [January 3, 2024, 9:11am UTC](https://discourse.julialang.org/t/how-to-understand-thread-count-as-reported-by-versioninfo/108289/1 "2024-01-03T09:11:57Z")

</div>

Before Julia 1.10, number of threads reported by `versioninfo()` was correct. For example, when started with 8 threads, Julia 1.9.4 shows the following:

```julia
julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa297 (2023-11-14 08:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × 12th Gen Intel(R) Core(TM) i5-1240P
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
  Threads: 8 on 16 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 8
  JULIA_PKG_USE_CLI_GIT = true
  JULIA_IMAGE_THREADS = 1

```

However, with Julia 1.10, the number of threads within **Platform Info** is reported as 11 instead of 8.

```julia
julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × 12th Gen Intel(R) Core(TM) i5-1240P
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, alderlake)
  Threads: 11 on 16 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 8
  JULIA_PKG_USE_CLI_GIT = true

```

Is this a bug or am I missing something?

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [January 3, 2024, 9:27am UTC](https://discourse.julialang.org/t/how-to-understand-thread-count-as-reported-by-versioninfo/108289/2 "2024-01-03T09:27:37Z")

</div>

Some threads are GC threads: [Command-line Interface · The Julia Language](https://docs.julialang.org/en/v1/manual/command-line-interface/)

On the master Git branch (the future v1.11), `versioninfo()` is finer grained, when started with `./julia -t5`, `versioninfo()` outputs `Threads: 5 default, 0 interactive, 2 GC (on 8 virtual cores)`.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [January 3, 2024, 9:39am UTC](https://discourse.julialang.org/t/how-to-understand-thread-count-as-reported-by-versioninfo/108289/3 "2024-01-03T09:39:12Z")

</div>

This was improved here by Ian:

> <https://github.com/JuliaLang/julia/pull/52423>
>
> Fixes https://github.com/JuliaLang/julia/issues/52404
> @nilshg I opted to make i…t one line as it fits.
> \`\`\`
> julia\> versioninfo()
> Julia Version 1.11.0-DEV.1011
> Commit bb7091c6f2\* (2023-12-04 14:58 UTC)
> Platform Info:
> OS: macOS (arm64-apple-darwin23.0.0)
> CPU: 10 × Apple M2 Pro
> WORD\_SIZE: 64
> LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
> Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
> Environment:
> JULIA\_EDITOR = code
> \`\`\`

---

<div class="post-metadata">

**Author:** ![vnegi10](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vnegi10/32/205882_2.png) [@vnegi10](https://discourse.julialang.org/u/vnegi10)\
**Post date:** [January 3, 2024, 11:07am UTC](https://discourse.julialang.org/t/how-to-understand-thread-count-as-reported-by-versioninfo/108289/4 "2024-01-03T11:07:54Z")

</div>

I see. Thanks for sharing the link!

Starting Julia with `--gcthreads=1` seems to fix the issue.

```julia
$ julia -t 8 --gcthreads 1 -q

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × 12th Gen Intel(R) Core(TM) i5-1240P
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, alderlake)
  Threads: 8 on 16 virtual cores
Environment:
  JULIA_PKG_USE_CLI_GIT = true

```
