attempt to compact the container