I think you want 

```ruby
[node["cpu"]["total"], 2, 4].sort.reverse[0]
```
To use the highest #cpus available. Not sure if the "4" will break anything if we just have a 2/1 core machine. So why not just node[:cpu][:total] ?