There are many different theories behind Bankroll Management and basically it is up to you to find a rule that works for you. Doyle Brunson in one of his books recommends a 1% theory for Sit and goes and Tournament Poker So that you never lose more than 1% of your total Bankroll in any single game.
However with a Cash game in mind he doubles that to 0.5% so a maximum buy-in to a KO game would be 1% of your total available Balance, $1 Dollar in every $100 Dollars you have for Tournament games, and for cash games be prepared to lose twice as much so only 50 Cents in every $100 but being prepared to sit down with the maximum buy in for a Cash Table.
Some players work on a 2% rule for Tournaments, others may prefer a 5% Rule but basically it is important to find a level you are comfortable in losing There is little point in depositing $100 Dollars and blowing the lot in 5 X $20 buy-ins, The pressure to Win is just too great! But if you are comfortable losing 1% or 2% of your total balance, then go for it, The important thing to remember when buying into any game is can you afford to lose! and if the Answer is no, then drop your level down. It's that simple.
I have had day's where I just couldn't make the money in any game I tried, losing every game I buy-into, but on other days I made the money bubble in every game I tried, But keeping to the 1% rule I was not crippled by losing 10 games in a single session, I still had 90% of my Bankroll to fight back with.
I keep in mind when buying into any game a simple Rule I like, called the KISS Rule, (Keep It Simple Stupid). Never invest more than you are willing to lose because some days you will lose every game you register for. It just Happens!