This paper presents the partitioning of the closed water distribution network (WDN) serving the city of Pavia, Italy. As a thus far poorly explored aspect in the scientific literature, clustering for the definition of size and extension of district metered areas (DMAs) and of inter-DMA boundary pipes is performed by ensuring that the DMAs respect the altimetric areas of the WDN by leaning on a modified formulation of modularity. To define the boundary pipes to be closed or alternatively fitted with a flow meter for the monitoring of DMA consumption, the dividing is performed with an innovative heuristic algorithm. This technique operates by sequentially implementing the boundary closures that do not cause significant head losses, to obtain an approximation of the Pareto front in the trade-off between number of flow meters installed and WDN reliability. In the last part of the work, the pumps present in the network are assumed to be equipped with the variable speed drive, and their hourly settings are optimized to regulate service pressure. Overall, WDN partitioning and pump setting optimization are proven to mitigate the service pressure and energy consumption of the WDN, offering evident and attractive benefits up to about 50% for water utilities.