Andres Freund <and...@anarazel.de> writes: > On 2020-04-10 13:09:13 +0530, Amit Khandekar wrote: >> On my Intel Xeon machine with 8 cores, I tried to test PAUSE also >> using a sample C program (attached spin.c).
> PAUSE doesn't operate on the level of the CPU scheduler. So the OS won't > just schedule another process - you won't see different CPU usage if you > measure it purely as the time running. You should be able to see a > difference if you measure with a profiler that shows you data from the > CPUs performance monitoring unit. A more useful test would be to directly experiment with contended spinlocks. As I recall, we had some test cases laying about when we were fooling with the spin delay stuff on Intel --- maybe resurrecting one of those would be useful? regards, tom lane