This! In my hobby projects I start the development usually with Raspberry Pi as backend, even for db, as it forces to use resources efficiently and reveals problems fast. Only building/compiling is good to be done on fast machine.
You can use the cpu cgroup controller to starve your program of CPU time. Use the cpu.cfs_quota_us and cpu.cfs_period_us knobs.
Now if only there was a way to use the blkio controller to emulate the performance characteristics of spinning rust (reasonable sequential IO performance but with a big penalty for random access...)