If you don't have a serious weed problem trying to get rid of (I wouldn't suggest compost in that instance anyway), then 2-3 inches should suffice.
Coarser materials (like wood chips) can be laid down thicker since they allow better gas exchange due to their pore sizes. They don't go hydrophobic in dry conditions either, something compost tends to do...
If the bed you're trying to mulch is ornamental, I highly recommend the latter. It decomposes slower and has overall greater benefits to the soil and plants.