# CPU using all cores despite config

**URL:** <https://discuss.ray.io/t/cpu-using-all-cores-despite-config/21142>\
**Category:** Configure Algorithm, Training, Evaluation, Scaling\
**Created:** [December 18, 2024, 5:42pm UTC](https://discuss.ray.io/t/cpu-using-all-cores-despite-config/21142 "2024-12-18T17:42:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hahabimbi](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@hahabimbi](https://discuss.ray.io/u/hahabimbi)\
**Post date:** [December 18, 2024, 5:42pm UTC](https://discuss.ray.io/t/cpu-using-all-cores-despite-config/21142/1 "2024-12-18T17:42:50Z")

</div>

Hello,  
I’m new to Ray/RLLib and I have been trying to test scaling basic RL training on my M1 mac air (8 cores). However, whatever I do, it seems the training runs on all cores.  
Here’s an example of a config I currently have for PPO:

```auto
# using ray.init(num_cpus=4, num_gpus=0)
PPOConfig()
        .api_stack(
            enable_rl_module_and_learner=True,
            enable_env_runner_and_connector_v2=True,
        )
        .environment(env)
        .env_runners(num_env_runners=3,
                     num_envs_per_env_runner=1,
                     num_cpus_per_env_runner=1,
                     num_gpus_per_env_runner=0)
        .training(
            lr=0.001,
            gamma=0.99,
            clip_param=0.2,
            train_batch_size=200 * 3,
            lambda_=0.95,
            num_epochs=10,
            
        )
        .learners(
            num_cpus_per_learner=1,
        )
        .resources(
            num_cpus_for_main_process=1,
        )

```

I was wondering what the problem is, as I have spent hours trying to fix this but with no luck. I’m starting to think it may not be supported on m1, even though I was under the impression it was supposed to be.  
Thank you!
