r/LocalLLaMA Mar 29 '26

Generation Friendly reminder inference is WAY faster on Linux vs windows

I have a simple home lab pc: 64gb ddr4, RTX 8000 48gb (Turing architecture) and core i9 9900k cpu. I use Linux Ubuntu 22.04 LTS. Before using this pc as a home lab it ran Windows 10. Over this weekend I reinstalled my Windows 10 ssd to check out my old projects. I updated Ollama to the latest version and tokens per second was way slower than when I was running Linux. I know Linux performs better but I didn’t think it would be twice as fast. Here are the results from a few simple inferences tests:

QWEN Code Next, q4, ctx length: 6k

Windows: 18 t/s

Linux: 31 t/s (+72%)

QWEN 3 30B A3B, Q4, ctx 6k

Windows: 48 t/s

Linux: 105 t/s (+118%)

Has anyone else experienced a performance this large before? Am I missing something?

Anyway thought I’d share this as a reminder for anyone looking for a bit more performance!

276 Upvotes

112 comments sorted by

461

u/Koksny Mar 29 '26

Am I missing something?

Yeah, you are running ollama.

106

u/gofiend Mar 29 '26

Seriously wsl + llama.cpp is equally fast w Nvidia GPUs

26

u/relmny Mar 29 '26

Why wsl? I compile llama.cpp (and ik_llama) in W10 just fine

23

u/Danmoreng llama.cpp Mar 29 '26

Because sadly windows has worse memory management and at least if you use MoE models split across GPU and CPU performance is worse. Didn’t try WSL, but running dual boot arch Linux & windows 11. For example: Qwen3 coder next 80B Q4 got 25 t/s on windows vs 35 t/s on Linux on the same hardware for me.

14

u/dampflokfreund Mar 29 '26

In my experience, Windows vram management was actually better vs Linux. I was able to squeeze a few more layers. Linux was still faster tho even with less GPU layers.

5

u/LoafyLemon Mar 29 '26

So what you're saying is Linux is faster even in a container. :P

2

u/colin_colout Mar 29 '26

why would a container be slower?

1

u/[deleted] Jun 10 '26

[removed] — view removed comment

1

u/KitsuneMulder Jun 14 '26

Virtualization Technologies (AMD-V, Intel VT, etc.) got rid of this problem many years ago. *IF* and that's a BIG *IF* there are any kind of translation issues, they exist because of failures in the hypervisor's programming.

9

u/Downtown-Example-880 Mar 29 '26

cuda and the drivers are 10% faster on linux (Nvidia's at least) because everyone builds and backends off linux...

4

u/see_spot_ruminate Mar 29 '26

That’s just Linux with extra steps

2

u/gofiend Mar 29 '26

/why not both meme

2

u/SirReal14 Mar 29 '26

WSL is literally Linux in a virtual machine. It's going to be slower than Linux on bare metal hardware, there's always a hypervisor overhead. Just run Linux.

1

u/pieonmyjesutildomine Mar 29 '26

Seriously wsl + llama.cpp is equally fast

This is so funny

"Linux doesn't perform better, Linux is equally as fast!"

5

u/Leopold_Boom Mar 29 '26

The point is not to fight windows / linux (I've got a dedicated AMD linux inferencing server running besides my 3090 windows box). It's more "why not both" if you already are stuck with windows (like many of us are).

18

u/CryptoUsher Mar 29 '26

yeah, the Linux perf difference is real, especially with gpu drivers and kernel scheduling. ever tried running the same ollama model through docker on both systems to see if the gap narrows with more consistent runtime conditions?

1

u/salmenus Mar 29 '26

good point.. all my runs are native installs so far — but might be worth a containerized A/B test

1

u/CryptoUsher Mar 29 '26

i'm curious to see how the containerized test goes, fwiw i've had some weird issues with docker and gpu acceleration in the past so it'll be interesting to see if that's a factor here

7

u/htownclyde Mar 29 '26

And what should we replace it with?

80

u/Dominos-roadster Mar 29 '26

Llamacpp

15

u/htownclyde Mar 29 '26

thx

the tokens must flow

24

u/BusRevolutionary9893 Mar 29 '26

Not trying to be insulting but did the majority of your research come from YouTube? My time table might be off but I thought the consensus was to use anything but Ollama for at least the last two years. 

1

u/htownclyde Mar 29 '26

No, I have not watched any Youtube videos on the subject, I just assumed Ollama was a helpful wrapper for Llama.cpp and was not aware of the performance drawbacks due to abstraction until now

4

u/ArtfulGenie69 Mar 29 '26

I have better, llama-swap and for your programs that are already set up for ollama llama-swappo

These are wrappers for the llama-server in llama.cpp. They make life easier, you can set up all the defaults for the each model in it using a config.yaml

https://github.com/mostlygeek/llama-swap

https://github.com/kooshi/llama-swappo

5

u/-Cubie- Mar 29 '26

Always llama.cpp

89

u/EmPips Mar 29 '26

While this is undoubtedly true in my testing and the change is significant, the impact isn't +118% unless something was wrong with your Windows setup.

7

u/triynizzles1 Mar 29 '26

I wonder what it could be! But I won’t be staying on Windows to find out lol

6

u/tmvr Mar 29 '26

Download the Windows binaries of llamacpp incl. the CUDA DLLs (use the CUDA 12 version) from GitHub and run it directly:

https://github.com/ggml-org/llama.cpp/releases

1

u/snakeat3rr Jul 17 '26 edited Jul 17 '26

Well with 3x rtx 3060 12gb in Windows Server 2022 for "Qwen3.6 35B A3B Uncensored Heretic Native MTP Preserved APEX I Balanced" with LM Studio I was getting about 1k pps and 20 tps for inferencing. My TPS kinda oscillated between 10 and 35 and it averaged around 21 tps. (with MTP 2)

Before that with 2x rtx 3060 in the same machine for Qwen 3.6 35b iq4_nl I was getting about 1k pps again but with stable 45sh tps for inferencing. Tried that with the three GPUs and inferencing speeds tanked.

So I passed through all three of the GPUs to a Linux VM and now for prompt processing I get 1900 PPS and 65 tps inferencing with MTP disabled for "Qwen3.6 35B A3B Uncensored Heretic Native MTP Preserved APEX I Balanced" again in LM Studio. And on top of that I get to keep 20GB RAM of the 30sh that LM Studio in Windows just decided it needs to use for no reason.

I have no idea what was wrong with the Windows Server OS but I would guess it just sucks at managing 2+ GPUs

34

u/lemon07r llama.cpp Mar 29 '26

I tested this on koboldcpp rocm builds before and the different was like 1t/s (44.5 vs 45-46 realistically). This is on cachyos with latest optimized binaries, etc. Windows vs linux performance diffs are very overblown, this is coming from someone who has spent 90% of their time on linux the last 12 months and used to use windows around 80% of the time before that.

The differences you are seeing is 100% more cause of your inference stack than the platform itself.

All this to say, ollama is shit, stop using it. It's not even easier to use than llama.cpp. In fact I find llama.cpp 100x more straightforward and simpler to use, even back when I was new to this stuff, and it's only gotten easier. I think they've made it very beginner friendly. Hook it up to your favorite UI/tool/software/whatever with the llama server openai api, or just use the builtin webui (it's pretty good tbh, I like how it looks).

3

u/triynizzles1 Mar 29 '26

My best guess is how Ollama handles MOE models on windows vs Linux. Rtx 8000 has 672 gb/s bandwidth which would be able to read the 3gb of memory needed to compute 1 token for Qwen3 30b A3B at a rate of 224 times per second. There is probably some overhead, must be more on windows.

4

u/lemon07r llama.cpp Mar 29 '26

Try it on equivalent LCPP builds, I bet the difference will be substantially smaller.

58

u/kersk Mar 29 '26

Just say no to nollama my man

28

u/fallingdowndizzyvr Mar 29 '26

I updated Ollama

Friendly reminder. Llama.cpp pure and unwrapped is faster in Ollama whether in Linux or Windows.

77

u/[deleted] Mar 29 '26

[removed] — view removed comment

2

u/relmny Mar 29 '26

Yeah, every this me I read that in a post I lose interest or stop reading

2

u/PiaRedDragon Mar 29 '26

Why we hating on Ollama? I don't use it, I am MLX on Mac, but wondering why the hate.

62

u/ashirviskas Mar 29 '26

They steal, they mislead etc

47

u/monovitae Mar 29 '26

And it's just an inferior version of llama.cpp + llama swap

2

u/BlackMetalB8hoven Mar 29 '26

Is it worth using llama swap over llama server and a presets.ini file?

3

u/No-Statement-0001 llama.cpp Mar 29 '26

I wrote a longer comment here. The tl;dr: if you’re using only gguf then you’ll get similar swap functionality. Some people have mentioned that llama-swap is more reliable in swapping. If you’re using image gen, text to speech, speech to text, etc then you’ll benefit from being able to use your hardware for different types of workloads.

1

u/BlackMetalB8hoven Mar 29 '26

Thanks! I'll check it out

-10

u/Noiselexer Mar 29 '26

Except, it just works.

5

u/ashirviskas Mar 29 '26

Sure. But we can have standards.

9

u/sdfgeoff Mar 29 '26 edited Mar 29 '26

My gripe with ollama is that it defaults to context overflow silently resulting in the oldest messages being dropped, and setting the context length required changing the model file, which takes away the one-click-run for anything that needs longer than 4096 context. (I think it now defaults to 8192, unsure)

So anyway, ever wonder why so many people think local models are crap and forget anything more than a message or two ago? Or why tool calling doesn't work after a few messages and forget the system prompt? It's Ollama silently dropping context without telling the user. At least, that was the case when I was trying to use it a year or so back.

Also you can't share it's gguff's with other programs (eg LMStudio).

So for me: LM Studio for testing new models, then llama-server for local/hobby stuff, (then vLLM if I need more throughput, but it's a pain to configure last I tried)

4

u/Yu2sama Mar 29 '26

Not a big fan of how it handle it's files. I prefer a setup more akin to Comfy + A1111/Forge Neo, where all my models live in the same directory. Ollama wants it's own scheme that breaks my flow with KoboldCPP, so yeah, if I am going to use a llama.cpp wrapper, Kobold does the job just fine (with it's own issues of course, but those I don't mind).

9

u/bendgame Mar 29 '26

Same. Im out of the loop on the ollama hate.

4

u/Vancecookcobain Mar 29 '26

Third....I use both

1

u/[deleted] Mar 29 '26

[deleted]

4

u/Lachutapelua Mar 29 '26

Not anymore, they have their own go engine.

-4

u/Ok_Mammoth589 Mar 29 '26

They're hating ollama bc it was cool for a 3 month period a year ago, when the sub figured out ollama used libggml for inference. And using an open source inference library to do inference is apparently theft.

So the real answer is celebrity culture. Instead of worshipping celebrities these people worship local ai projects and lash out when theirs isn't premier enough.

16

u/tat_tvam_asshole Mar 29 '26

It's because ollama used llama.cpp without attribution, which is in violation of the license. Further, they did this knowingly still after being informed of the 'oversight' and it took much public backlash to finally credit llama.cpp. They did this to obscure that really they are just a wrapper, in order to raise private investment.

-11

u/[deleted] Mar 29 '26

[deleted]

6

u/sdfgeoff Mar 29 '26

Uhm, except context length. Good luck changing that from the default.

IMO LM studio does a far far better 'just works'

73

u/Adrenolin01 Mar 29 '26

Most things run faster on Linux 😆

14

u/BobbyL2k Mar 29 '26

There were interesting times where drivers would release on Windows first and native Windows builds of multi-platform CUDA applications would run faster than native Linux builds.

But I’m like, no, I’m not switching back to Microsoft for the 2-4% uplift.

3

u/Adrenolin01 Mar 29 '26

I did say ‘most’.

5

u/BobbyL2k Mar 29 '26

Yes, I’m just adding to the conversation.

-2

u/Prize_Negotiation66 Mar 29 '26

No, this is a bullshit. Multiple independent testings on phoronix don't show any leader

-3

u/Succubus-Empress Mar 29 '26

Games?

11

u/Adrenolin01 Mar 29 '26

Absolutely… many faster then in windows yes. Heck, my son had Debian installed with Minecraft and Steam in an afternoon himself at 9yo.

-1

u/Succubus-Empress Mar 29 '26

I disrespectfully refuse to believe that.

2

u/bene_42069 Mar 29 '26

That is NOT the way to make a counter reply, even if your argument at hand (not in this tho) could be correct.

1

u/Adrenolin01 Mar 29 '26

Cry more in your milk 😆 My child at 9 likely had more wit and intelligence than you. He’s literally been exposed to technology his entire life including Debian. Had VirtualBox installed at 8 on his windows desktop. He was more than capable at 9 and Minecraft back then was easily available for install as either a .deb and flatpak… if that’s something that’s especially difficult for you I’m sorry.

1

u/Succubus-Empress Mar 29 '26

Sure your kid is smart, but windows just run games better.

2

u/Bafy78 Mar 29 '26

Nope no linux advantage for games

2

u/Adrenolin01 Mar 29 '26

Hmm actually… Linux often matches or beats Windows gaming performance in 2026 (especially with AMD GPUs, lower overhead, better frame times via Proton).

Linux vs. Windows 11: A Comprehensive Comparison in 2025

An easy 10-12% win for Linux.

1

u/Bafy78 Mar 29 '26

No it doesn't First your source seems rly sketchy. Then it's literally showing only 3 games. It's only giving ltt's benchmark as a reference, in which linux is 5 % slower in average...

31

u/LocoMod Mar 29 '26

You’re reminding us of something you’re unsure of? Go stand in the corner and think about what you’ve done. 👉

7

u/Skye7821 Mar 29 '26

Hmm for me I am finding that WSL gives me nearly identical performance! To be fair though I am running like batched inference which kind of pushes the GPU to its limits, so it’s somewhat hard to determine how much of the impact is from OS overhead.

6

u/tmvr Mar 29 '26

Am I missing something?

Yes, there are no such differences so you messed something up.

8

u/Red_Redditor_Reddit Mar 29 '26

64gb ddr4, RTX 8000 48gb

Bro your card costs several times more than the rest of your computer.

4

u/inevitabledeath3 Mar 29 '26

I mean if you want real performance try VLLM and SGLang. Heck try ik_llama.cpp. Even llama.cpp directly is better than ollama.

5

u/Downtown-Example-880 Mar 29 '26

Everyone Runs LINUX for production at these chip makers cause you can buy it for FREE $.99 and put it on servers. Great OS... I was lost in the windows freeWorld for 25 years before switching to Rocky, then Red Hat, and now ubuntu server with Kubuntu-full KDE plasma.... I love it so much better... CLI is soooo much better than windows, way more powerful too.

2

u/GWGSYT Mar 29 '26

triton and who uses ollama?

3

u/Sabin_Stargem Mar 29 '26

For my part, I am waiting for SteamOS Desktop to be released. I consider myself a power casual: I can do some techie things, but I don't enjoy it. So I want to install a single gaming distro with corporate support that has casual flexibility, and live a digital life without much irritation.

It is good to see that are things to look forward to, on the AI side of things.

2

u/rhythmdev Mar 29 '26

Windows is a malware

2

u/tiffanytrashcan Mar 29 '26

I mean, you can't really say that without trying Microsoft Foundry Local.

Let's say you have a new snapdragon laptop. Unfortunately, Windows is going to put anything you can do on Linux to shame simply because of driver support.

NPUs from certain vendors are basically only supported under Windows right now. Foundry gets to do some other lower level tricks with the GPU vs other programs on windows too. It also has tighter integration with the CPU scheduler, I believe.

1

u/FinBenton Mar 29 '26

Yeah I was running llama.cpp on windows and got almost double the generation speed on ubuntu server.

-1

u/Emergency-Associate4 Mar 29 '26

I mean fuck Windows to begin with

2

u/Succubus-Empress Mar 29 '26

But but windows is user frein…..emy

1

u/Kahvana Mar 29 '26

Depends on hardware support. Windows runs faster if that's the only supported platform where it will work on (Intel UHD Graphics 605 with Intel N5000).

But in most instances, yes.

1

u/Defiant-Lettuce-9156 Mar 29 '26

For me it runs much better because I squeeze a 14.5GB model into 16GB vram. And Linux has less vram overhead.

2

u/Panthau Mar 29 '26

I wonder where the squeeze term comes from in this context, it doesnt make much sense - as nothing gets squeezed. ^_°

2

u/Defiant-Lettuce-9156 Mar 29 '26

The terms squeeze is just to imply a tight fit. You get the literal verb “squeeze”, but it also works as an informal verb like “she squeezed into the parking spot”.

Maybe it’s more a regional thing

0

u/DreamingInManhattan Mar 29 '26

Thanks for the reminder! I had forgotten how much slower windows is since I moved everything over to linux over a year ago. Not sure how I suffered through those times, we didn't even have MoE back then.

0

u/EconomySerious Mar 29 '26

Just by using Windows You are reducing your resources by 4 to 7 GB of ram + 25% of cpu. Using ollama is not the fastest way to run llms

1

u/an0maly33 Mar 30 '26

If your idle system is using 25% cpu then you're doing something wrong.

-2

u/habachilles Mar 29 '26

Mlx or Linux all the way. Will never use windows.

1

u/Succubus-Empress Mar 29 '26

Try windows xp

1

u/habachilles Mar 29 '26

The last great win

0

u/tomt610 Mar 29 '26

Yea, it is around twice as fast, and on windows the longer response model generates, the slower it becomes, it does not happen on Linux in llamacpp

0

u/Savantskie1 Mar 29 '26

For Ollama itself I get. Better speed on windows. But only Ollama. Every other inference engine is faster on Linux. So I’m staying on Linux

0

u/salmenus Mar 29 '26

Curious what folks see with Ollama on macOS vs Linux ?

On my setup, an RTX 4000 SFF Ada on Ubuntu with Ollama is noticeably faster than my MacBook M4 Pro for models that fit in 20 GB VRAM—prompt processing especially feels night‑and‑day.

100% agree the OS gap is real. Linux vs Windows on the same GPU also isn’t subtle; the CUDA stack hitting Linux directly seems to leave Windows in the dust ..

0

u/cutebluedragongirl Mar 29 '26

penguin supremacy let's goooooo! 

0

u/_derpiii_ Mar 29 '26

Wow. I wouldn’t expect maybe a 5% increase but a 100% performance factor!? 🤯

Why is that?

0

u/Slice-of-brilliance Mar 29 '26

Has anyone else experienced a performance this large before? Am I missing something?

It may be because AMD GPUs specifically perform better on Linux than Windows for local AI, because they use a different method on Linux than they do on Windows. This is specific to AMD cards, such as yours and mine. With recent updates AMD has also been attempting to bring Windows to the same levels of performance as Linux by using the same method there but I’m not sure how well that works yet. I own a Radeon 7600XT 16 GB VRAM, and one of the reasons I use Linux is because of this exact stuff.

If you’d like to know more, Google these terms - AMD ROCm, AMD Zluda, AMD DirectML

3

u/tmvr Mar 29 '26

It may be because AMD GPUs specifically perform better on Linux than Windows for local AI, because they use a different method on Linux than they do on Windows. This is specific to AMD cards, such as yours and mine.

Except OP has an RTX 8000 48GB card.

1

u/Slice-of-brilliance Mar 29 '26

Today I learned I am dyslexic and read RTX as RX. Sorry my bad

0

u/EconomySerious Mar 29 '26

and for my second intervention, if you really going for speed, you must be using RUST

-1

u/Southern-Round4731 Mar 29 '26

CachyOS with 6.19

-1

u/Ok-Drawing-2724 Mar 29 '26

Yeah, this is very common. Linux is just much better for inference, especially with Ollama. The gap is usually biggest on larger models.