04-28-2015, 02:11 AM
I have a dedicated server (i3-540 + 8GB RAM + 1TB HDD in RAID) with CentOS 6.6 + Nginx 1.8.0 (:80) and Apache (:8080).
I run a couple of websites on this server, and TTFB is OK for HTML/JS/CSS. Especially when it comes from cache.
However, when I try to open a 500KB .gif image directly it has very big TTFB values.
It always has ~1.5-1.75s TTFB.
First, I tried to optimize my Nginx server but then opened this image from :8080 Apache's port, and got same delay. So, the problem is not in Nginx.
My server actually has totally free bandwidth (1 of 100Mbit/s), low I/O wait ratios (like 0.2-0.5 ms) and low average load (0.05-0.2).
Then why I get this huge delay for static file?
P.S.: I actually have much more powerful server in another data center of same hosting provider but do not get such a big TTFB. It has same OS, Nginx/Apache configs.
I run a couple of websites on this server, and TTFB is OK for HTML/JS/CSS. Especially when it comes from cache.
However, when I try to open a 500KB .gif image directly it has very big TTFB values.
It always has ~1.5-1.75s TTFB.
First, I tried to optimize my Nginx server but then opened this image from :8080 Apache's port, and got same delay. So, the problem is not in Nginx.
My server actually has totally free bandwidth (1 of 100Mbit/s), low I/O wait ratios (like 0.2-0.5 ms) and low average load (0.05-0.2).
Then why I get this huge delay for static file?
P.S.: I actually have much more powerful server in another data center of same hosting provider but do not get such a big TTFB. It has same OS, Nginx/Apache configs.