I'm running a regular Python program on a i7 with 64GB RAM. I have lots of repeats so I have about 10 instances of this program running at the same time. Looking at the system resourses (on ubuntu 18.04), I have all 8 cores working at 100% capacity but I'm still only using 22GB RAM. I'm curious, why are all cores at maximum capacity if there is RAM still left to use?
I think your program is using all available processing power - that's why all cores are at 100%. But this doeasn't mean that all RAM has to be used. Ram is not a substitution for CPU, it's memory. Maybe your program just doesn't require any more memory - it doesn't have to use all of the memory all the time.
On normal conditions for a core platform cpus are limited by their clock frequency (what depend on heat dissipation), instructions per clock cycle (ipc, related to bus width, https://en.wikipedia.org/wiki/Instructions_per_cycle) and therefore pipeline support mainly (https://en.wikipedia.org/wiki/Instruction_pipelining). How fast memory channels can support pipelines through data for instructions is important, if cpus are below 100% usage.
On Ubuntu 18.04 you could install netdata system logger that would show you that relation between cpu and memory usage within detailed charts on a web browser on localhost:19999. While running your python program you then see how much cpu utilisation and ram usage this program needs for a period of time (default ~1/4 hour).
Virtualization or database management can be example for high memory usage with varying cpu utilisation.