My rule of thumb on ammo stockpiling: When buying a new firearm, purchase just as much ammo as the value of the new firearm you've purchased. If you cannot do this, try weekly or monthly a little bit at a time. Have a constant reserve of rounds that you cycle through just like food storage, "first in - first out".
As for the ratios to balance the quantity for SHTF scenario (or ammo shortage!): 1/3 .22LR, 1/3 shotgun or rifle rounds for hunting, of many variety, and 1/3 Milsurp ammo for your battle rifles.
My suggested minimum 7000 rounds .22LR, 7000 rounds of shotgun/rifle for hunting, and 7000 rounds of Milsurp. Live to a strict code. If you cannot afford to replace your reserve stockpile by either purchasing factory made rounds or by reloading with primers, powder and bullets - don't go shooting. You owe it to yourself and your family if you are a prepper and take the prepping lifestyle seriously. If not, ignore all of my advice.
FYI- I can't imagine having 20,000 rounds of .22lr stockpiled, but for long-term storage have some variety and buy as high quality ammo as you can afford. It would take forever to shoot 20,000 .22lr rounds and hoarding this much is just plain selfish. If you buy it for barter (if you really believe the end is near which I don't) this may justify having 20K on hand. That's a lot of plinking time otherwise.