man tasksetrefers 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... )