Small pairs require at least 10 to 1 implied
odds to be played profitably. In reality, even more than that for the medium pairs, because they lose more often when played as top pair and because reverse implied odds are huge for an overpair like 99.
If you have 30BB or more, you can limp or call a small raise. For smaller stacks, playing should only be done in late position because a raise kills the odds. Generally, a stack between 10-20BB doesn't allow profitable play for small and medium PPs.
For stacks smaller than 10BB, you can move all-in as pairs have good showdown value.
Note that "stack" is the smaller of your stack and your likely opponents.