This help article is designed as a first step to help guide you to determining what is causing your server or website to have high latency. We recommend you read our full guide which can be found here which covers things like CDN's (content delivery networks), databases and further optimization methods for delivering your hosted content.
Main areas to consider and check
One of the first things you should do is check your server resources to see if you are hitting any limits.
Every program on your server will use RAM, some just a little, and some massive amounts. If a program or service is using too much memory, the server may be unable to process requests in an orderly fashion, particularly if you have an unexpected surge in traffic.
The speed of some tasks can be significantly affected by processor speed and core counts. While simple web pages generally do not require much CPU power (one core for a small site is fine), tasks like game server hosting, or dynamic websites with lots of database lookups or heavy media use will start to experience issues if your CPU specs are too small.
If you're experiencing serious network issues such as total connectivity loss, the first thing to do would be to check our status page. https://status.bitlaunch.io/. We post any updates regarding outages there and you can also subscribe to updates.
The bandwidth of a server determines how much data it can transmit at once. As you can imagine, if your server has thousands of people connecting to it at the same time, the bandwidth requirements can be intense. Each VPS is on a shared network which will be true for BitLaunch servers, as well as all of our third party hosts. During peak times, network congestion may cause some latency. BitLaunch servers run on shared 1gbps networks. This is suitable for the majority of use cases but you could also give our other hosts a try to see if they work better for you.
How to diagnose your server slowdown
Sites like ping.pe allow you to test the route from your server to client PCs using the ping tool. It allows you to assess delays to different regions to determine whether there are issues along that route.
You can also perform an mtr test, which combines traceroute (recording the route a packet takes to get to its destination) and ping. It is useful for determining problem areas within a network or wider network infrastructure.
How to monitor your server's hardware resources
Server issues can be identified quickly through the use of server monitoring tools:
top or htop: Allows you to search out memory/CPU-hungry processes
netstat or tcpdump: Lets you monitor your incoming and outgoing TCP traffic, routing tables, network interfaces, and protocols.
iotop and iostat: Helps you to determine CPU and I/O usage to determine bottlenecks there.
If your server is a BitLaunch server, you can also monitor your server's CPU utilization, disk IO, and bandwidth in your server control panel.
Check and manage your logs
Server logs will help you to identify whether processes are misbehaving, if there is a user performing malicious tasks on your server, and more. Linux servers keep a multitude of different logs that can be used to diagnose various issues. If you suspect malicious activity, you should especially check the authentication logs, which will show you who logged in, when, and from what IP address.
However, you should make sure that you aren't keeping logs for too long, as this process can use valuable SSD space and other system resources.