Improve load time/ first time to byte of slow website

I start to get a little desperate because I don’t know where to look any more. Hope you can help me.

I have two websites hosted at CloudVPS ( On my Windows VPS there are two websites: and The websites are made in .NET and use Umbraco as CMS. The technique is the same, the DB, the DB structure, configurations, settings, photo’s/ pictures are down sized, everything is compressed, Gzip…everything is the same (at lease as fas as my knowledge goes and what I have checked).

The only thing that is different and is really getting an issue is the loading time/ waiting time/ time to first byte. It takes between 7-11 sec for to load and usable for visitors. That is way to long compaired to (takes about 2-3 sec to load).

What could be the problem? And most important how to solve this? Because we are running our add campains this has a big impact on our revenu. I hope that there is somebody who can and will help me :slight_smile:

See the attachment for the testing results. Let me know if more info is needed. Thanks.


Are they on the same VPS? From the outside we aren’t going to be able to see what is causing the slow TTFB. An APM product installed on your server (like NewRelic, AppDynamics or Dynatrace) should point to the problem really quickly. I believe all of them have a free trial which should be more than enough to get to the root cause of the problem.

It could be external calls made from the back-end or slow database queries specific to the slower site (or possibly something else).

From the blue bar in the “/” request you can see that it’s spending 5 seconds delivering the HTML content. This isn’t DNS or network related - but most likely time your server is computing the contents of what needs to be on the page.

Over 5000ms for that is something that can (and should) be improved. If you’re able to trace the calls within the code (like with an APM as Patrick suggested) you can optimize from that level - yet that requires knowing a lot about the code and database.

If that’s too advanced, think about a caching layer. Something like varnish for html or memcached for data will help. If the entire page can be static, consider setting up page rules within a service like Cloudflare.

Since your running custom code (no CMS like WordPress), a good starting point will be.

I’m guessing your running MySQL…

  1. Switch to MariaDB

  2. Alter/Update MyISAM tables to InnoDB.

  3. Enable slow query logging + no index logging + fix all reported problems.

  4. If binlog processing is enabled, disable it, unless you’re actually running replication.

  5. Move /tmp off disk into a tmpfs (memory) based file system.

  6. Run mysqltuner + fix any emitted diagnostics.

  7. If your site makes many internal DNS calls, as in site reference URLs which contain a protocol + domain in links + systemd-resolved is running, strip it out + replace it with dnsmasq, as systemd-resolved is badly broken + will slow your site to a crawl, if Asset #1 requires any DNS lookups… even if you think those lookups should be cached, likely they aren’t, if systemd-resolved is running.