Ask Your Question
1

Using only one cpu core

asked 2016-10-21 04:09:45 -0500

peter55555 gravatar image

I need to run performance tests for my concurrent program and my requirement is that it should be run on ONLY ONE cpu core. (I don't want to cooperative threads - I want always have a context switching).

So I have two questions.

1) The best solution - to sign and reserve only one cpu core only for my program (to force OS to not use this cpu core). I guess it is not possible but maybe I'm wrong...

2) How to set linux (Fedora 24) to use only one cpu core?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-21 14:05:45 -0500

ssieb gravatar image

The term you are looking for is CPU pinning. Try using the taskset command. man taskset for more info.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-10-21 03:53:03 -0500

Seen: 86 times

Last updated: Oct 21 '16