Disabling hyperthreading on MediaTek MT7621AT

I'm using a Ubiquiti Edgerouter-x running OpenWRT and used as Softether VPN client. The VPN client has SSL encryption enabled, which needs much CPU power. The MT7621AT is as dual core MIPS CPU, each core having 2 threads (like intel hyperthreading, from what I understood). The result is that the VPN client uses maximum 100% of 1 thread, which means 25% of total available CPU power (seen with "top" command).

The performance is a VPN upload rate of 40Mbps, which is not bad, but could be better. If I disable the SSL encryption, I reach 120Mbps (Note: I have a 300Mbps up/ 300Mbps down fiber connection).

My question is simple: is it possible to disable the "hyperthreading" function, so that the kernel would see and use only the 2 raw cores, and the VPN process could use 50% of total CPU power rather than only 25%?

Thanks for your advice


If you have only two cores enabled or hyperthreading disabled, why you think that one core would give you more performance?

50% of two cores is the same as 25% of four cores!

You will get a bit more performance per core with disabled ht, when you really use 100% of the available computation ressources.

1 Like

Hyperthreading actually doesnt mean a single core can actually 'compute' two processes at once. The general idea is that two processes are loaded very close to the actual ALU (generally this means registers near it) from the process pipeline. Now every process is not going to be useful because many times some processes might become invalid or have missing operands by time the core wants to actually compute it. Thus the core may end up wasting cycles waiting for a new process to load. Having two ready processes in the core means the cpu core stays active as much as possible. Thus the kernel sees this as the core can execute two processes so it can ready and send them to the core but in reality the core can compute only one at a time. This is why all cores these days from a software standpoint are virtual because the hardware can be anything underneath. We can even have 8way hyperthreading. As a result hyperthreading doesn't necessarily translate to 2x performance, or disabling it wont give the cpu any significant benefit unless there is some kind of issue in the implementation or a security problem. Your performance would probably be worse disabling it. I hope this is informative.