Metaspace allocation tries to optimize the space wastage by allocating large Metachunks after allocating some number of smaller Metachunks. The thinking is that smaller Metachunks has more wastage and if the Class has allocated several smaller Metachunks, it's a large Class so will need more space and larger Metachunks might be more optimal.
The first part of this task is to see how true the assumption: that once several smaller Metachunks have been allocated, then larger Metachunks should be allocated.
The second part of this is to change allocation so that if the desired Metachunk size is not available, choose an available Metachunk size that is big enough rather than expand the Metaspaces.