Optimize hdd size calculation