markfasheh / duperemove

Tools for deduping file systems
GNU General Public License v2.0
794 stars 78 forks source link

duperemove: Use lscpu as primary way to detect cores/threads #253

Closed lorddoskias closed 3 years ago

lorddoskias commented 3 years ago

Current thread/core detection code assumes that a physical core can have at most 2 threads. This is wrong so fix it by parsing the output of 'lscpu -p'. This utility is part of util-linux which most distributions have so it shouldn't be problematic that duperemove calls it. In case it can't find it it will fallback to the old algorithm.

Fixes #243