Reputation: 13
I have a couple of programs that will be put on a system with limited core's. I want to test performance of these programs on my current system that is a lot more powerful than the one it will be on.
Is the only way to fully limit the proper resource is through a Virtual Machine on my system, or can I just restrict my system to meet the same core limit as the other system my programs will run on?
Upvotes: 1
Views: 48
Reputation: 445
taskset
might help you.
Start your application your_command
as follows:
taskset -ac 0-3 your_command
# -c 0-3: your_command might run on cores 0 to 3
# a : all of the 4 cores may be used
If the application is already running:
taskset -acp 0-3 PID
# PID = process ID
See this answer to 'Limit process to one cpu core' at Unix & Linux for further details .
Upvotes: 2