Skip to main content
1 of 8

How to ensure CPU availability for a running process

At first, the question seems to be a little bit silly/confusing as the OS does the job of managing process execution.

However, I want to measure how much some processes are CPU/IO-bound and I feel like my OS is interfering on my experiments with, for instance, scheduled OS processes.

Take as an example the following situation: I ran the process A twice and got the following output from the tool "time" (time columns in seconds):

+---+-------+---------+-----------+---------+ |Run|Process|User Time|System Time|Wall time| +---+-------+---------+-----------+---------+ |1 |A |196.3 |5.12 |148.86 | |2 |A |190.79 |4.93 |475.46 | +---+-------+---------+-----------+---------+

As we can see, although the user and sys time are similar, the elapsed time of both drastically changes (diff. of ~5 min). Feels like something in my environment caused some sort of contention.

I want to stop every possible background process/services to avoid any kind of noise during my experiments but I consider myself a novice/intermediate unix-user and I don't know how to guarantee this.

I'm using Linux 4.4.0-45-generic/Ubuntu 14.04 LTS 64 bits.

I really appreciate the assistance. If you guys need any missing information, I will promptly edit my post.

Thanks in advance!