The VOIDRUNNER'S CODEX is LIVE! Explore new worlds, fight oppressive empires, fend off fearsome aliens, and wield deadly psionics with this comprehensive boxed set expansion for 5E and A5E!
According to this calculator, level 10. You'd get 225 XP per CR 2 encounter at level 9, and keep doing so until you level up. At level 10, you get 0 XP per encounter.
Don't forget about the boredom factor. Based on my quick calculation, a single 9th level character would have to go through 40 CR 2 creatures to get to level 10. A party of four would have to go through 160. At some point the player's are going to throw up their hands and bring the whole dungeon down rather than go through more boring CR2 battles.