taskset cmd - interpreting the man pages [Solved]

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
lazarus

taskset cmd - interpreting the man pages [Solved]

Post by lazarus »

man taskset refers specifically to CPUs & processors, which is rather vague in terms of modern CPUs.

By 'CPU' does it mean node, socket or core? At first glance I would assume it means socket, but... :shrug: Similarly, what is meant by 'processor?'

I have an old SQL database which ran perfectly fine on an old single socket/core system. Slow, but as fast as the CPU allowed. This db is not constantly accessed but when it is it undergoes fairly intensive use.

Trying to run the same database on a more modern single socket/6-core system has woefully slow response times; from investigation so far I suspect the affinity scheduler is dumping all the idle threads onto one core and not moving to another them until they wake... leading to heavy cache invalidation and slowdowns. (After all this sw wasn't written for multi-socket/core systems.)

So I'm looking to setting CPU affinity for the db sw to a specific core at startup; all threads, one core = same cache, no cache invalidation.

But I'm hesitant to use taskset in case it does actually mean CPU = socket and not core... then using it would just make the OS jump through hoops for no real gain. And I don't wish to risk my data experimenting.

(I can, of course, simply update the db sw to something more recent. I will... eventually. Even so, I'd still like an answer to the initial question. It helps fend off the hounds of senility baying at my door... :roll: )
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: taskset cmd - interpreting the man pages

Post by rene »

It does mean core, as is checked by say watching firefox in top, having in the "f" field-selection picked "P" (and having moved it up) while tasksetting firefox. The terminology is still from a time when CPU and Core where the same thing (and except for the scheduler, due to cache optimization indeed, as far as software is concerned they basically still are).
lazarus

Re: taskset cmd - interpreting the man pages

Post by lazarus »

Excellent. Thank you.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: taskset cmd - interpreting the man pages [Solved]

Post by rene »

Personally I would find spelling "were" as "where" slightly below excellent, but it was late...
Locked

Return to “Software & Applications”