Minecraft wiki entry for Mob_farm, associated text: You should clear out the entire chunk where the mob farm is by placing torches. The game has a limit on the number of hostile mobs based on the number of loaded chunks, so it's a good idea to make sure all of them spawn in the farm.
You may need a somewhat beefy computer to operate the farm, since mob AI can be taxing on the server component of the game program. Check the TPS indication if you are on singleplayer, or ask about the server host for rules on multiplayer servers. The quicker mobs are killed, the less likely AI is going to be a problem.