The mob cap is a set ammount of each type of mob that can be in a dimension in single player. We will be discussing how this effects mob farms and their efficiency.
The mob cap is a pre defined number that says the max or "cap" of the ammount of mobs that can spawn in minecraft. We will be talking about it for single player because multiplayer is much more complex. The hostile mob cap is 70 which mean only 70 hostle mobs can spawn in each dimension in a time. This limits the ammount of mobs that can spawn in our farm therefore limiting the ammount of items we can get. The way we get past this is decreasing the time it takes to kill the mobs. If you have a farm that skips 50% of all spawn attempts because the mob cap is full then the farm will be 50% slower than if it didn't. The ways we can decrease the time to kill are by either using nether portals because as soon as a mob enter's one it disiapears or "gets killed". The other way is to decrease the distance it has to go to its fall or player kill method. With gold farms which we will discuss later sometimes it isn't possible to reduce the distance they have to travel to die but that is besides the point. Most smart people don't use portals unless they have an amazing pc because it can cause your game to lagg tremendously. However if you are desigining a max rate farm then portals must be used because they will always be faster than any other method.