mirror of
https://github.com/ollama/ollama.git
synced 2026-05-06 16:11:34 -05:00
[GH-ISSUE #2496] default num_thread incorrect on some large core count system (non-hyperthreading) #63497
Closed
opened 2026-05-03 13:49:59 -05:00 by GiteaMirror
·
41 comments
No Branch/Tag Specified
main
dhiltgen/ci
parth-launch-plan-gating
hoyyeva/anthropic-reference-images-path
parth-anthropic-reference-images-path
brucemacd/download-before-remove
hoyyeva/editor-config-repair
parth-mlx-decode-checkpoints
parth-launch-codex-app
hoyyeva/fix-codex-model-metadata-warning
hoyyeva/qwen
parth/hide-claude-desktop-till-release
hoyyeva/opencode-image-modality
parth-add-claude-code-autoinstall
release_v0.22.0
pdevine/manifest-list
codex/fix-codex-model-metadata-warning
pdevine/addressable-manifest
brucemacd/launch-fetch-reccomended
jmorganca/llama-compat
launch-copilot-cli
hoyyeva/opencode-thinking
release_v0.20.7
parth-auto-save-backup
parth-test
jmorganca/gemma4-audio-replacements
fix-manifest-digest-on-pull
hoyyeva/vscode-improve
brucemacd/install-server-wait
parth/update-claude-docs
brucemac/start-ap-install
pdevine/mlx-update
pdevine/qwen35_vision
drifkin/api-show-fallback
mintlify/image-generation-1773352582
hoyyeva/server-context-length-local-config
jmorganca/faster-reptition-penalties
jmorganca/convert-nemotron
parth-pi-thinking
pdevine/sampling-penalties
jmorganca/fix-create-quantization-memory
dongchen/resumable_transfer_fix
pdevine/sampling-cache-error
jessegross/mlx-usage
hoyyeva/openclaw-config
hoyyeva/app-html
pdevine/qwen3next
brucemacd/sign-sh-install
brucemacd/tui-update
brucemacd/usage-api
jmorganca/launch-empty
fix-app-dist-embed
mxyng/mlx-compile
mxyng/mlx-quant
mxyng/mlx-glm4.7
mxyng/mlx
brucemacd/simplify-model-picker
jmorganca/qwen3-concurrent
fix-glm-4.7-flash-mla-config
drifkin/qwen3-coder-opening-tag
brucemacd/usage-cli
fix-cuda12-fattn-shmem
ollama-imagegen-docs
parth/fix-multiline-inputs
brucemacd/config-docs
mxyng/model-files
mxyng/simple-execute
fix-imagegen-ollama-models
mxyng/async-upload
jmorganca/lazy-no-dtype-changes
imagegen-auto-detect-create
parth/decrease-concurrent-download-hf
fix-mlx-quantize-init
jmorganca/x-cleanup
usage
imagegen-readme
jmorganca/glm-image
mlx-gpu-cd
jmorganca/imagegen-modelfile
parth/agent-skills
parth/agent-allowlist
parth/signed-in-offline
parth/agents
parth/fix-context-chopping
improve-cloud-flow
parth/add-models-websearch
parth/prompt-renderer-mcp
jmorganca/native-settings
jmorganca/download-stream-hash
jmorganca/client2-rebased
brucemacd/oai-chat-req-multipart
jessegross/multi_chunk_reserve
grace/additional-omit-empty
grace/mistral-3-large
mxyng/tokenizer2
mxyng/tokenizer
jessegross/flash
hoyyeva/windows-nacked-app
mxyng/cleanup-attention
grace/deepseek-parser
hoyyeva/remember-unsent-prompt
parth/add-lfs-pointer-error-conversion
parth/olmo2-test2
hoyyeva/ollama-launchagent-plist
nicole/olmo-model
parth/olmo-test
mxyng/remove-embedded
parth/render-template
jmorganca/intellect-3
parth/remove-prealloc-linter
jmorganca/cmd-eval
nicole/nomic-embed-text-fix
mxyng/lint-2
hoyyeva/add-gemini-3-pro-preview
hoyyeva/load-model-list
mxyng/expand-path
mxyng/environ-2
hoyyeva/deeplink-json-encoding
parth/improve-tool-calling-tests
hoyyeva/conversation
hoyyeva/assistant-edit-response
hoyyeva/thinking
origin/brucemacd/invalid-char-i-err
parth/improve-tool-calling
jmorganca/required-omitempty
grace/qwen3-vl-tests
mxyng/iter-client
parth/docs-readme
nicole/embed-test
pdevine/integration-benchstat
parth/remove-generate-cmd
parth/add-toolcall-id
mxyng/server-tests
jmorganca/glm-4.6
jmorganca/gin-h-compat
drifkin/stable-tool-args
pdevine/qwen3-more-thinking
parth/add-websearch-client
nicole/websearch_local
jmorganca/qwen3-coder-updates
grace/deepseek-v3-migration-tests
mxyng/fix-create
jmorganca/cloud-errors
pdevine/parser-tidy
revert-12233-parth/simplify-entrypoints-runner
parth/enable-so-gpt-oss
brucemacd/qwen3vl
jmorganca/readme-simplify
parth/gpt-oss-structured-outputs
revert-12039-jmorganca/tools-braces
mxyng/embeddings
mxyng/gguf
mxyng/benchmark
mxyng/types-null
parth/move-parsing
mxyng/gemma2
jmorganca/docs
mxyng/16-bit
mxyng/create-stdin
pdevine/authorizedkeys
mxyng/quant
parth/opt-in-error-context-window
brucemacd/cache-models
brucemacd/runner-completion
jmorganca/llama-update-6
brucemacd/benchmark-list
brucemacd/partial-read-caps
parth/deepseek-r1-tools
mxyng/omit-array
parth/tool-prefix-temp
brucemacd/runner-test
jmorganca/qwen25vl
brucemacd/model-forward-test-ext
parth/python-function-parsing
jmorganca/cuda-compression-none
drifkin/num-parallel
drifkin/chat-truncation-fix
jmorganca/sync
parth/python-tools-calling
drifkin/array-head-count
brucemacd/create-no-loop
parth/server-enable-content-stream-with-tools
qwen25omni
mxyng/v3
brucemacd/ropeconfig
jmorganca/silence-tokenizer
parth/sample-so-test
parth/sampling-structured-outputs
brucemacd/doc-go-engine
parth/constrained-sampling-json
jmorganca/mistral-wip
brucemacd/mistral-small-convert
parth/sample-unmarshal-json-for-params
brucemacd/jomorganca/mistral
pdevine/bfloat16
jmorganca/mistral
brucemacd/mistral
pdevine/logging
parth/sample-correctness-fix
parth/sample-fix-sorting
jmorgan/sample-fix-sorting-extras
jmorganca/temp-0-images
brucemacd/parallel-embed-models
brucemacd/shim-grammar
jmorganca/fix-gguf-error
bmizerany/nameswork
jmorganca/faster-releases
bmizerany/validatenames
brucemacd/err-no-vocab
brucemacd/rope-config
brucemacd/err-hint
brucemacd/qwen2_5
brucemacd/logprobs
brucemacd/new_runner_graph_bench
progress-flicker
brucemacd/forward-test
brucemacd/go_qwen2
pdevine/gemma2
jmorganca/add-missing-symlink-eval
mxyng/next-debug
parth/set-context-size-openai
brucemacd/next-bpe-bench
brucemacd/next-bpe-test
brucemacd/new_runner_e2e
brucemacd/new_runner_qwen2
pdevine/convert-cohere2
brucemacd/convert-cli
parth/log-probs
mxyng/next-mlx
mxyng/cmd-history
parth/templating
parth/tokenize-detokenize
brucemacd/check-key-register
bmizerany/grammar
jmorganca/vendor-081b29bd
mxyng/func-checks
jmorganca/fix-null-format
parth/fix-default-to-warn-json
jmorganca/qwen2vl
jmorganca/no-concat
parth/cmd-cleanup-SO
brucemacd/check-key-register-structured-err
parth/openai-stream-usage
parth/fix-referencing-so
stream-tools-stop
jmorganca/degin-1
brucemacd/install-path-clean
brucemacd/push-name-validation
brucemacd/browser-key-register
jmorganca/openai-fix-first-message
jmorganca/fix-proxy
jessegross/sample
parth/disallow-streaming-tools
dhiltgen/remove_submodule
jmorganca/ga
jmorganca/mllama
pdevine/newlines
pdevine/geems-2b
jmorganca/llama-bump
mxyng/modelname-7
mxyng/gin-slog
mxyng/modelname-6
jyan/convert-prog
jyan/quant5
paligemma-support
pdevine/import-docs
jmorganca/openai-context
jyan/paligemma
jyan/p2
jyan/palitest
bmizerany/embedspeedup
jmorganca/llama-vit
brucemacd/allow-ollama
royh/ep-methods
royh/whisper
mxyng/api-models
mxyng/fix-memory
jyan/q4_4/8
jyan/ollama-v
royh/stream-tools
roy-embed-parallel
bmizerany/hrm
revert-5963-revert-5924-mxyng/llama3.1-rope
royh/embed-viz
jyan/local2
jyan/auth
jyan/local
jyan/parse-temp
jmorganca/template-mistral
jyan/reord-g
royh-openai-suffixdocs
royh-imgembed
royh-embed-parallel
jyan/quant4
royh-precision
jyan/progress
pdevine/fix-template
jyan/quant3
pdevine/ggla
mxyng/update-registry-domain
jmorganca/ggml-static
mxyng/create-context
jyan/v0.146
mxyng/layers-from-files
build_dist
bmizerany/noseek
royh-ls
royh-name
timeout
mxyng/server-timestamp
bmizerany/nosillyggufslurps
royh-params
jmorganca/llama-cpp-7c26775
royh-openai-delete
royh-show-rigid
jmorganca/enable-fa
jmorganca/no-error-template
jyan/format
royh-testdelete
bmizerany/fastverify
language_support
pdevine/ps-glitches
brucemacd/tokenize
bruce/iq-quants
bmizerany/filepathwithcoloninhost
mxyng/split-bin
bmizerany/client-registry
jmorganca/if-none-match
native
jmorganca/native
jmorganca/batch-embeddings
jmorganca/initcmake
jmorganca/mm
pdevine/showggmlinfo
modenameenforcealphanum
bmizerany/modenameenforcealphanum
jmorganca/done-reason
jmorganca/llama-cpp-8960fe8
ollama.com
bmizerany/filepathnobuild
bmizerany/types/model/defaultfix
rmdisplaylong
nogogen
bmizerany/x
modelfile-readme
bmizerany/replacecolon
jmorganca/limit
jmorganca/execstack
jmorganca/replace-assets
mxyng/tune-concurrency
jmorganca/testing
whitespace-detection
jmorganca/options
upgrade-all
scratch
cuda-search
mattw/airenamer
mattw/allmodelsonhuggingface
mattw/quantcontext
mattw/whatneedstorun
brucemacd/llama-mem-calc
mattw/faq-context
mattw/communitylinks
mattw/noprune
mattw/python-functioncalling
rename
mxyng/install
pulse
remove-first
editor
mattw/selfqueryingretrieval
cgo
mattw/howtoquant
api
matt/streamingapi
format-config
mxyng/extra-args
shell
update-nous-hermes
cp-model
upload-progress
fix-unknown-model
fix-model-names
delete-fix
insecure-registry
ls
deletemodels
progressbar
readme-updates
license-layers
skip-list
list-models
modelpath
matt/examplemodelfiles
distribution
go-opts
v0.23.1
v0.23.1-rc0
v0.23.0
v0.23.0-rc0
v0.22.1
v0.22.1-rc1
v0.22.1-rc0
v0.22.0
v0.22.0-rc1
v0.21.3-rc0
v0.21.2-rc1
v0.21.2
v0.21.2-rc0
v0.21.1
v0.21.1-rc1
v0.21.1-rc0
v0.21.0
v0.21.0-rc1
v0.21.0-rc0
v0.20.8-rc0
v0.20.7
v0.20.7-rc1
v0.20.7-rc0
v0.20.6
v0.20.6-rc1
v0.20.6-rc0
v0.20.5
v0.20.5-rc2
v0.20.5-rc1
v0.20.5-rc0
v0.20.4
v0.20.4-rc2
v0.20.4-rc1
v0.20.4-rc0
v0.20.3
v0.20.3-rc0
v0.20.2
v0.20.1
v0.20.1-rc2
v0.20.1-rc1
v0.20.1-rc0
v0.20.0
v0.20.0-rc1
v0.20.0-rc0
v0.19.0
v0.19.0-rc2
v0.19.0-rc1
v0.19.0-rc0
v0.18.4-rc1
v0.18.4-rc0
v0.18.3
v0.18.3-rc2
v0.18.3-rc1
v0.18.3-rc0
v0.18.2
v0.18.2-rc1
v0.18.2-rc0
v0.18.1
v0.18.1-rc1
v0.18.1-rc0
v0.18.0
v0.18.0-rc2
v0.18.0-rc1
v0.18.0-rc0
v0.17.8-rc4
v0.17.8-rc3
v0.17.8-rc2
v0.17.8-rc1
v0.17.8-rc0
v0.17.7
v0.17.7-rc2
v0.17.7-rc1
v0.17.7-rc0
v0.17.6
v0.17.5
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.1-rc2
v0.17.1-rc1
v0.17.1-rc0
v0.17.0
v0.17.0-rc2
v0.17.0-rc1
v0.17.0-rc0
v0.16.3
v0.16.3-rc2
v0.16.3-rc1
v0.16.3-rc0
v0.16.2
v0.16.2-rc0
v0.16.1
v0.16.0
v0.16.0-rc2
v0.16.0-rc0
v0.16.0-rc1
v0.15.6
v0.15.5
v0.15.5-rc5
v0.15.5-rc4
v0.15.5-rc3
v0.15.5-rc2
v0.15.5-rc1
v0.15.5-rc0
v0.15.4
v0.15.3
v0.15.2
v0.15.1
v0.15.1-rc1
v0.15.1-rc0
v0.15.0-rc6
v0.15.0
v0.15.0-rc5
v0.15.0-rc4
v0.15.0-rc3
v0.15.0-rc2
v0.15.0-rc1
v0.15.0-rc0
v0.14.3
v0.14.3-rc3
v0.14.3-rc2
v0.14.3-rc1
v0.14.3-rc0
v0.14.2
v0.14.2-rc1
v0.14.2-rc0
v0.14.1
v0.14.0-rc11
v0.14.0
v0.14.0-rc10
v0.14.0-rc9
v0.14.0-rc8
v0.14.0-rc7
v0.14.0-rc6
v0.14.0-rc5
v0.14.0-rc4
v0.14.0-rc3
v0.14.0-rc2
v0.14.0-rc1
v0.14.0-rc0
v0.13.5
v0.13.5-rc1
v0.13.5-rc0
v0.13.4-rc2
v0.13.4
v0.13.4-rc1
v0.13.4-rc0
v0.13.3
v0.13.3-rc1
v0.13.3-rc0
v0.13.2
v0.13.2-rc2
v0.13.2-rc1
v0.13.2-rc0
v0.13.1
v0.13.1-rc2
v0.13.1-rc1
v0.13.1-rc0
v0.13.0
v0.13.0-rc0
v0.12.11
v0.12.11-rc1
v0.12.11-rc0
v0.12.10
v0.12.10-rc1
v0.12.10-rc0
v0.12.9-rc0
v0.12.9
v0.12.8
v0.12.8-rc0
v0.12.7
v0.12.7-rc1
v0.12.7-rc0
v0.12.7-citest0
v0.12.6
v0.12.6-rc1
v0.12.6-rc0
v0.12.5
v0.12.5-rc0
v0.12.4
v0.12.4-rc7
v0.12.4-rc6
v0.12.4-rc5
v0.12.4-rc4
v0.12.4-rc3
v0.12.4-rc2
v0.12.4-rc1
v0.12.4-rc0
v0.12.3
v0.12.2
v0.12.2-rc0
v0.12.1
v0.12.1-rc1
v0.12.1-rc2
v0.12.1-rc0
v0.12.0
v0.12.0-rc1
v0.12.0-rc0
v0.11.11
v0.11.11-rc3
v0.11.11-rc2
v0.11.11-rc1
v0.11.11-rc0
v0.11.10
v0.11.9
v0.11.9-rc0
v0.11.8
v0.11.8-rc0
v0.11.7-rc1
v0.11.7-rc0
v0.11.7
v0.11.6
v0.11.6-rc0
v0.11.5-rc4
v0.11.5-rc3
v0.11.5
v0.11.5-rc5
v0.11.5-rc2
v0.11.5-rc1
v0.11.5-rc0
v0.11.4
v0.11.4-rc0
v0.11.3
v0.11.3-rc0
v0.11.2
v0.11.1
v0.11.0-rc0
v0.11.0-rc1
v0.11.0-rc2
v0.11.0
v0.10.2-int1
v0.10.1
v0.10.0
v0.10.0-rc4
v0.10.0-rc3
v0.10.0-rc2
v0.10.0-rc1
v0.10.0-rc0
v0.9.7-rc1
v0.9.7-rc0
v0.9.6
v0.9.6-rc0
v0.9.6-ci0
v0.9.5
v0.9.4-rc5
v0.9.4-rc6
v0.9.4
v0.9.4-rc3
v0.9.4-rc4
v0.9.4-rc1
v0.9.4-rc2
v0.9.4-rc0
v0.9.3
v0.9.3-rc5
v0.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1.27
v0.1.26
v0.1.25
v0.1.24
v0.1.23
v0.1.22
v0.1.21
v0.1.20
v0.1.19
v0.1.18
v0.1.17
v0.1.16
v0.1.15
v0.1.14
v0.1.13
v0.1.12
v0.1.11
v0.1.10
v0.1.9
v0.1.8
v0.1.7
v0.1.6
v0.1.5
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
v0.0.21
v0.0.20
v0.0.19
v0.0.18
v0.0.17
v0.0.16
v0.0.15
v0.0.14
v0.0.13
v0.0.12
v0.0.11
v0.0.10
v0.0.9
v0.0.8
v0.0.7
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
Labels
Clear labels
amd
api
app
bug
build
cli
cloud
compatibility
context-length
create
docker
documentation
embeddings
feature request
feedback wanted
good first issue
gpt-oss
gpu
harmony
help wanted
image
install
intel
js
launch
linux
macos
memory
mlx
model
needs more info
networking
nvidia
ollama.com
performance
pull-request
python
question
registry
rendering
thinking
tools
top
vulkan
windows
wsl
Mirrored from GitHub Pull Request
No Label
bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ollama#63497
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mokkin on GitHub (Feb 14, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2496
Originally assigned to: @dhiltgen on GitHub.
I have tested Ollama on different machines yet, but no matter how many cores or RAM I have, it's only using 50% of the cores and just a very few GB of RAM.
For example now I'm running
ollama rum llama2:70bon 16 core server with 32 GB of RAM, but while prompting only eight cores are used and just around 1 GB of RAM.Is there something wrong? In the models descriptions are aleways warning you neet at least 8,16,32,... GB of RAM.
@easp commented on GitHub (Feb 14, 2024):
That's fine & as expected.
Model data is memory mapped and shows up in file cache #. Note too, VIRT, RES & SHR memory # of the Ollama processes.
Generation is memory bandwidth limited, not compute limited. Saturation is generally achieved ~1/2 the number of virtual cores. Using more can actually hurt speeds and interferes unnecessarily with other processes.
@Zbrooklyn commented on GitHub (Feb 18, 2024):
What if I want it to use more CPU cores is there a config file or command for that?
@robertvazan commented on GitHub (Feb 23, 2024):
@Zbrooklyn Change 'num_thread' parameter in custom modelfile.
@Cguanqin commented on GitHub (Mar 8, 2024):
hei,bro~
it's still using 50% of the cores and 50% of RAM after modifying Modelfile that increased num_thread.from 8 to 16 。
my Modelfile is as follows:
FROM gemma:2b
PARAMETER num_thread 16
@robertvazan commented on GitHub (Mar 8, 2024):
@Cguanqin You are probably doing something wrong. Try to write down reproducible steps. That will probably reveal the mistake.
@Cguanqin commented on GitHub (Mar 8, 2024):
oh,I don't know where the problem is. I want to run the Gemma: 2b model in Ollama. My machine is configured with 16CPU and 16RAM. Can you provide a modelfile reference? Thank you!
@robertvazan commented on GitHub (Mar 8, 2024):
@Cguanqin Your modelfile looks alright. The problem is probably in the way you try to use it. I am using Open WebUI with Ollama, which provides convenient UI for modelfile editing. But if I were you, I wouldn't waste effort on raising thread count. I tried it and it does indeed worsen throughput. One thread per physical core is indeed optimal.
@AdamYLK commented on GitHub (Mar 15, 2024):
same issue for me,i find another issue
Performance e-core bug(?) - only 50% CPU utilization when using all threads - (Win11, Intel 13900k)
i can't use -t to set thread on linux server
@arbarbieri commented on GitHub (Apr 1, 2024):
Worked for me! Thanx!
@johnalanwoods commented on GitHub (Apr 23, 2024):
Sorry to necro the thread, but why is this done specifically? Are only random portions of the model used at runtime?
@robertvazan commented on GitHub (Apr 23, 2024):
@johnalanwoods Not a llama.cpp/ollama developer, but let me guess. One of the advantages is that you can have model larger than RAM. It will be super slow, limited by SSD speed, but it will work. Another reason is that OS is given a chance to discard the pages when the model is not in use and load them back when model is used again. There might be other reasons.
@johnalanwoods commented on GitHub (Apr 24, 2024):
Makes sense thanks!
@sekrett commented on GitHub (Apr 29, 2024):
This is true if you have hyper-threading enabled, but if disabled, only half of the CPU power is used.
@dhiltgen commented on GitHub (May 2, 2024):
Yes, by default we only create a thread per physical core. Trying to map inference threads to hyperthreads thrashes the CPU and results in poorer performance.
@sekrett commented on GitHub (May 3, 2024):
I don't have hyper-treading at all (Core i5 9600K) and still 3 of 6 cores are used. How can ollama distinguish if hyper-threading is enabled?
@dhiltgen commented on GitHub (May 3, 2024):
@sekrett the following might help shed some light...
For reference, on a 4-core (8 hyperthread) Intel CPU I see something like this:
@wwjCMP commented on GitHub (May 3, 2024):
If my machine does not have hyper-threading enabled, how can I set it up to allow more physical cores to be used by ollama?
@dhiltgen commented on GitHub (May 3, 2024):
@wwjCMP if your CPU does not have hyperthreads, then the "thread_siblings" above are supposed to show no siblings, and we should default to one thread per core. If that's not the behavior you're seeing, can you share the output of the above from your system?
@wwjCMP commented on GitHub (May 3, 2024):
@wwjCMP commented on GitHub (May 3, 2024):
@wwjCMP commented on GitHub (May 3, 2024):
Here you are
@dhiltgen commented on GitHub (May 4, 2024):
Thanks for the output @wwjCMP. It does look like the thread_siblings are all unique so we should allocate 96 threads by default on this system. I'll try to figure out why this isn't happening.
As a workaround, you should be able to set num_thread to override our default behavior. For example:
@oldgithubman commented on GitHub (May 21, 2024):
The current logic is completely borked. On my 13900K (24-core, 32-thread), ollama defaults to using four cores. If I set it to use 24 cores, it uses 16. If I set it to use 32, it uses 24. The default should be to use all the physical cores, which you say is the current default, but it isn't. If the user sets num_threads (why isn't this a global setting?), ollama should use the number of threads the user set, regardless of performance
@Googlepuss commented on GitHub (Jun 5, 2024):
I have ollama set up on VM for testing, with 12 vCPU (4 socket & 3 core topology) and 16GB RAM (no GPU). I am not sure where to see the global default num_thread from CLI, but open-webui indicates "2". I came to this thread looking for a reason why RAM has almost zero utilization (maybe 2-3GB of available 16), while the CPU seems to be completely taxed by every query. I could throw more resources at it, but with the RAM seemingly not used, I am wondering if there is a configuration I have overlooked. most everything is the default.
me@follama:
$ ls /sys/devices/system/cpu/$ cat /sys/devices/system/cpu/cpu*/topology/thread_siblingscpu0 cpu10 cpu2 cpu4 cpu6 cpu8 cpufreq crash_hotplug isolated modalias offline possible present uevent
cpu1 cpu11 cpu3 cpu5 cpu7 cpu9 cpuidle hotplug kernel_max nohz_full online power smt vulnerabilities
me@follama:
00000000,00000001
00000000,00000400
00000000,00000800
00000000,00000002
00000000,00000004
00000000,00000008
00000000,00000010
00000000,00000020
00000000,00000040
00000000,00000080
00000000,00000100
00000000,00000200
@oldgithubman commented on GitHub (Jun 5, 2024):
If I understand correctly, the low RAM usage is an illusion due to the way linux memory mapping works. Pull up a tool like glances and watch the IO to your drive. As long as it's not obviously streaming from your drive, you're probably fine
@Googlepuss commented on GitHub (Jun 6, 2024):
Thanks, @oldmanjk! had not used glances prior, and is super useful. Attaching screenshots when running basic questions "sky blue", "tell a joke", "short story", etc. Disck i/o doesn't stand out, CPU stays pegged, mem never exceeds 6.9% (of 16GB vRAM). this is all llama3:latest and /set parameter num_gpu 0 num_thread 12. not sure where to go next I guess. CPU is not super modern but should be able to handle tell me a joke without pegging out.
@oldgithubman commented on GitHub (Jun 6, 2024):
Yeah, I discovered glances recently and like it so far. It has a lot of depth I haven't had the time to explore yet. I thought you were talking about system RAM, not VRAM. VRAM should show as used when in use, so something isn't offloading right. num_gpu is how many layers you want offloaded to gpu, so that explains that. Assuming you want to utilize your gpu more, you want to increase that number, or if you just want ollama to use most of your gpu, delete that parameter entirely
Edit - I see now you mean virtual RAM. I didn't catch the no-gpu thing earlier. Yeah, if you're not using gpu, your CPU has to do all the work, so you should expect full usage. It will go all-out until it's done. Full usage is actually a good thing, because it means you're not bottlenecked by IO. If you want less usage so you can do other things simultaneously, tell ollama to use fewer threads (make sure none of those vCPU's are mapped to vcores). Ideally, you want to offload to a GPU.
(I keep realizing I'm misreading what you wrote - I'm a bit off atm - so if I screwed anything further up, I apologize)
@Googlepuss commented on GitHub (Jun 6, 2024):
No worries at all. thanks for the feedback. yes "virtual RAM". I am interested in your remark about hyperthreading, I have 2 intel E5-2680 v3 on host and VM env managed by xcp-ng/XOA. So, the hypervisor sees "48 Core 2 Socket" and "Hyperthread enabled". But in bare metal terms, it is 2 Socket, 24 Core, and 48 Thread. With hyperthread disabled on the host, this would bring the available vCPU count from 48 to 24 (believe). is this problematic (having hyperthreading enabled)?
@oldgithubman commented on GitHub (Jun 6, 2024):
It's not a problem for hyperthreading to be enabled, no. You'll just get better performance (usually - test it) if you restrict inference to physical cores. Also worth testing running inference just on the physical cores of one CPU, depending on memory layout, etc. You're probably losing performance from inter-CPU communication overhead. Limiting to one CPU might cut your available memory in half though. Basically, test all these things if you're looking for better performance, but again, you're much better off using a GPU if you can
@Googlepuss commented on GitHub (Jun 6, 2024):
Thanks! I will take the direction and play with the CPU mappings. Agree on the GPU, just trying to get the CPU-only config optimal before I work in GPU and likely a dedicated host. Appreciate it.
@sekrett commented on GitHub (Jun 7, 2024):
Completely agree, I tested on different desktops and Xeons, without HT you get code compilation faster by setting
make -j8for example.@jasonwang178 commented on GitHub (Jul 2, 2024):
Hi, how can I set the
num_threadforollama serveinstead ofollama run?@jasonwang178 commented on GitHub (Jul 2, 2024):
Alright, I found the solution for
ollama serve. Simply add thenum_threadparameter when making the API request.Reference: https://github.com/ollama/ollama/blob/main/docs/api.md#request-6
@GregChiang0201 commented on GitHub (Jul 29, 2024):
Excuse me, is there any option can change num_thread permanently? Since I can only run the instructions above every time to set the custom threads, or the system will use half of my cores to run it.
@dbustosrc commented on GitHub (Jul 30, 2024):
#5554
@tigran123 commented on GitHub (Oct 1, 2025):
Oh dear, how confident are we in forcing a policy, where only a mechanism should be provided, forgetting the wise words of Linus Torvalds back from early 1990s, explaining that OS (and software in general) should never force any stupid (i.e. stupid to a user who knows perhaps better than the developer) policy down all users' throat and only providing mechanisms, leaving it up to the user to decide, which policy he ought to adopt.
Now, in this case, I would say it is very naive to assume that everyone's CPU would behave in exactly the same way that a particular CPU that the developer has tested on does. The whole point of virtual threads appearing as "separate CPUs" (e.g. in /proc/cpuinfo) is that they ought to really be used as separate CPUs in the sense of MP specification. That was the case 20 years ago and it is true today. Yes, in some (in many, I agree) scenarios it would be inefficient to use more than the number of physical cores, i.e. more than half of the virtual threads, but in others it would be more efficient. Otherwise there would be no such thing as HT support.
So, please provide a way (other than passing "num_thread" via API, unless it is possible to set it via Open WebUI, is it?) to set the num_thread somehow. Again, without having to create a new model via Modelfile specifically for this purpose.
I tried setting OLLAMA_NUM_THREADS environment variable to 12 and it did make a difference only at the initial load (which became almost twice as fast, btw!) but during the actual inference it reverted back to 6. I have Intel Core i7-6800K CPU which has 6 cores and 12 threads (of course HT is enabled, as it generally makes everything TWICE as fast -- that is the whole point of HT).
I found the PR for OLLAMA_NUM_PARALLEL, but it is not merged yet:
https://github.com/ollama/ollama/pull/9546
So, are there any workarounds, please?
UPDATE: Could it be that I simply misspelled OLLAMA_NUM_THREADS and it should be OLLAMA_NUM_THREAD instead? I will try both and see.
UPDATE: No, unfortunately, I still have 50% CPU utilisation, i.e. num_thread is internally set to 6, ignoring both OLLAMA_NUM_THREAD and OLLAMA_NUM_THREADS environment variables.
@tigran123 commented on GitHub (Oct 1, 2025):
UPDATE: I was reluctant to do
ollama create model -f modelfilebecause I thought that it was going to duplicate the whole 65GB file :)Now I have created a
num_thread 12version of gpt-oss:120b and compared its performance to the default one -- indeed, it is twice as slow -- 40 seconds vs 21 seconds for inference on the same prompt (from fresh state ofollama serve).Thank you for your patience :)
@tigran123 commented on GitHub (Oct 5, 2025):
Another update: I don't know how did I get those "40 vs 21 seconds" numbers before, but now I consistently get the opposite, namely: 17-19 seconds for the 12 threads version (100% cpu utilisation) and 28-31 seconds for the 6 threads version (50% CPU utilisation). Here are the screenshots and I can easily reproduce it. So, the default num_thread is set wrongly, after all. It should be set to the logically obvious value -- the number of CPUs (i.e. virtual threads) and not the number of physical cores as it does currently. At least on my Intel Core i7-6800K system with 128GB RAM.
@minyor commented on GitHub (Oct 10, 2025):
Hello, I have same problem on our E5-2699 v3 server with 70+ cores.
Small models on ollama version is 0.1.38 loads and works fast under 4 seconds per request
But starting from ollama version 0.1.39 and up to latest version the loading and resposes take up to 15 minutes...
Setting OLLAMA_NUM_THREADS or OLLAMA_NUM_THREAD nor num_thread to 70 wont help..
Please adwise, are we really stack with this old ollama?
@tigran123 commented on GitHub (Oct 10, 2025):
Why not do what I did -- have a trivial Modelfile like this:
then it works perfectly if
num_threadis matching the number of real CPUs in the SMP sense (not some secondary notion of the so-called "physical cores" which is not useful and that is why it is not normally exported via API -- though one can manually count thecore idvalues in/proc/cpuinfo, of course).It is sad that the Ollama developers are stubbornly refusing to change the defaults, presumably because some exotic tests done by someone suggested that using only half of the available CPUs is somehow beneficial. But this is not critical -- just create a proper model clone for each of your models (i.e. with num_thread matching the number of CPUs) and everything works fine, and much faster than with this unfortunate default.
@minyor commented on GitHub (Oct 10, 2025):
But I tried this, I modified existing model parameter like so:
But this only made my model run slow even on an 0.1.38 version of ollama, not only on >=0.1.39
Only deleting a model and redownloading it helped to make it run fast again on 0.1.38
And I do not mean a little slow, but about 90 times slower...
I surelly must've did something incorrect
Edit: Also, when I run requests, all the 72 cores are at 100% of load, whole these 15 slow minutes...
If this is a problem with number of threads then shouldn't only one or some cores be loaded instead of all of them?
Edit: If I edit the model again but this time set num_threads 0 likeso:
Then It again starts to work fast but only in ollama <=0.1.38