What is an EP in hosting?

If you have ever hosted a website, you might have come across the term EP or entry process. Log in to your host’s administration page, and there will be a section dedicated to your plan resources usage. One of those metrics is for EP or Entry Processes. Read on to learn what they are, and how they do affect your website?
So what does this mean?
One Entry Process is similar to one running script. When you see an entry process of one out of the limit set by your host, all this means is that one script – PHP or other – is being executed. When it comes to visitors, it usually means that one visitor is exploring one page of your site’s.
It is not unusual for cheap shared hosting plans to set a low limit of approximately 20 EPs per account, which means 20 scripts all running concurrently. But is that too low, normal, or high? The right answer is it depends.
Normally, when a visitor finds their way to your site, a PHP script is being executed. Most PHP scripts only need a fraction of a second to finish their job. If they are optimized, and you are limited to 20 EPs, then you should be able to see at least 50 concurrent visitors – easily. If each visitor opens more than one tab of your site, or if your scripts are not well optimized, then the total number of visitors that can be served concurrently would be reduced.
It is important to note that shell scripts, SSH sessions, Cron jobs etc, also count as entry processes. Also a badly written script or one with many dependencies can delay the total execution time needed, therefore it could reserve an EP for longer, and that would reduce the total number of concurrent visitors using your site even further.
How does it work?
Of course, it is nearly impossible for all of your visitors to land on your site at the exact same fraction of a second, hence requesting the maximum number of scripts all together at the same time.
What happens is the first request calls a script which reserves one EP and its processing begins. Then a second request calls the same or another script which reserves another EP. When the first request has finished processing, the first EP is released, and only the second one is still reserved. When the second request has finished processing also, then the second EP is released as well, leaving all EPs available for more requests again.
That goes on and on indefinitely while you are having more visitors coming to your site, or while you are performing any administrative tasks on your site.
Can you give an example?
Sure!
The featured image of this post was generated by having more than 30 tabs reloading a home page every one second all together. You can clearly see that the total number of EPs is no more than 2/60. That means that a well optimized page can handle way more visitors than the number of entry processes assigned to the account. And that is before any caching is utilized.
Why do hosts set EP limits?
Usually hosts set that limit to a low enough number so as to prevent a single user consuming all the server resources. That is one easy way to prevent DDoS attacks against the server. If one account needs too many entry processes, then that means it would also need more memory and CPU. When one account exhausts its limits in one host, then that account is experiencing reduced performance, or worse, but that does not affect the other residents of the server’s (unless they are exhausting their resources too). That wouldn’t be the case if every account was free to consume as many resources as they might appear to need.
At the same time it is a good way to maximize resources usage of any given server. In simple words, the less resources one account reserves without suffering while used normally, the larger the number of available resources left for more accounts that they could host on a single machine. However, very low resources limits are usually found in the cheapest hosting plans tiers, so website owners usually would expect that to be the case.
What happens if I reach that limit?
If your site is serving so large a number of visitors that it often exhausts the EP limit, then you should consider upgrading your hosting to one with an increased EP limit. Doing so should benefit you in terms of storage, memory, inodes, IO, IOPS etc., which you should also need when your site grows anyway.
The first indication that that is the case, is when you start to constantly see 508 errors thrown in your browser instead of your expected pages.
If your site doesn’t serve a large number of visitors, but you are still experiencing a high EP usage, then that could be a good indication that some of your scripts are hanging for whatever reason, and they are not releasing your resources in time. In that case you should investigate into optimizing your scripts.
Another possible culprit for CMS users (e.g. WordPress) could be the sheer number of plugins you might be using to extend the default functionality, or it could also be an individual plugin which is not well written by its developer.
