taskset cmd - interpreting the man pages [Solved]

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
lazarus
Level 3
Level 3
Posts: 153
Joined: Mon Jul 02, 2018 11:36 pm
Location: Oberon, OZ

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 lazarus on Fri Sep 21, 2018 9:08 am, edited 1 time in total.
- Andy

I may be weird but I'm saving up to become eccentric.
rene
Level 16
Level 16
Posts: 6689
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
Level 3
Level 3
Posts: 153
Joined: Mon Jul 02, 2018 11:36 pm
Location: Oberon, OZ

Re: taskset cmd - interpreting the man pages

Post by lazarus »

Excellent. Thank you.
- Andy

I may be weird but I'm saving up to become eccentric.
rene
Level 16
Level 16
Posts: 6689
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...
Post Reply

Return to “Software & Applications”