A
A
Alexey2020-12-17 02:04:27
linux
Alexey, 2020-12-17 02:04:27

How to assign kernels to a process?

Good evening, let's get straight to the point. On vds under Linux + debian container, 2 game servers are installed for 2 users, there was a difficulty in assigning cores to the processes of these servers, there are 4 cores and you need to install 2 cores for each process.
I tried this:
taskset -c 0.1 ./gameserver start
taskset -c 2.3 ./gameserver start
At first everything worked, then after rebooting the machine everything went wrong, confusion began, the process was set to 1.2 cores and did not use others, I didn’t see if they weren’t there, but they are, I checked htop.
Maybe someone knows how to solve the problem, maybe there is a better way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Karpion, 2020-12-17
@Karpion

Obviously, the command tasksetonly affects the gameserver launched from it. Those. this must be done every time the computer is started.

K
ky0, 2020-12-17
@ky0

You lift two virtual machines and limit them on use of the processor. That's it, the hypervisor itself will figure out which cores to give out to whom.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question