The Filter Scheduler weighs hosts based on the config option scheduler_weight_classes, this defaults to nova.scheduler.weights.all_weighers, which selects the only weigher available -- the RamWeigher. Hosts are then weighed and sorted with the largest weight winning.
The default is to spread instances across all hosts evenly. Set the ram_weight_multiplier option to a negative number if you prefer stacking instead of spreading.