Welcome to WebmasterWorld Guest from 54.156.56.73

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Images taking longer to load on new server

Apache 2.0

     
8:41 pm on Jul 22, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 29, 2003
posts:236
votes: 0


I have a new dedicated server that has 3 times the specs as our current VPS servers - however, the new dedicated (running Apache 2.0) is serving images much slower than the same site on our VPS (shared) servers (running Apache 1.3.22). I'm just curious if it could be due to a setting in apache that I'm missing. - Both servers are with the same hosting company in the same NOC.

On a positive note, PHP and MySQL are running noticeably faster on the dedicated server! It just seems odd that the images are loading much slower on the dedicated server (RedHat ES w/Apache 2.0).

Just in case, I opened another thread in WebmasterGeneral to see if it may be related to the IP address I was provided.

Let me know if there is any information I could provide to better assist me.

Thanks!

9:01 pm on July 22, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Are you configuring correct cache-control headers on the new server? If you can still do an A-B test, then start each test by flushing your browser cache before loading images; images already in cache don't have to be requested from the server, and so will appear to load much faster.

Use the server headers check in the WebmasterWorld control panel and check the cache-control headers on image requests.

Jim

10:19 pm on July 22, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 29, 2003
posts:236
votes: 0


I'm currently doing cache control within our php.ini file (same on both servers).

I've tried clearing the cache and testing both sites - and then simply doing a refresh once the images are in the cahce and both times the old shared server supplies the images faster.

I even tried a tool on NetMechanic.com where it times load times - and each test shows it was able to load pages faster on the old server.

Below are the headers from both servers:

OLD VPS

HTTP/1.1 200 OK
Date: Thu, 22 Jul 2004 22:11:54 GMT
Server: Apache/1.3.22 (Unix) PHP/4.3.1 mod_perl/1.26 FrontPage/5.0.2.2623 AuthMySQL/2.20 mod_ssl/2.8.5 OpenSSL/0.9.6a
X-Powered-By: PHP/4.3.1
Set-Cookie: PHPSESSID=38978d6bf343ad44b790ad06b6668b15; path=/
Cache-Control: private, max-age=10800, pre-check=10800
Last-Modified: Thu, 1 Jul 2004 04:21:35 GMT
Set-Cookie: Referal_URL=deleted; expires=Wed, 23-Jul-03 22:11:53 GMT; path=/; domain=.domain-name.com
Content-Encoding: gzip
Vary: Accept-Encoding
Connection: close
Content-Type: text/html

DEDICATED

HTTP/1.1 200 OK
Date: Thu, 22 Jul 2004 22:16:01 GMT
Server: Apache/2.0.46 (Red Hat)
Accept-Ranges: bytes
X-Powered-By: PHP/4.3.2
Set-Cookie: PHPSESSID=f5b9ba46402b8c8963b0819ef0cfe1db; path=/
Cache-Control: private, max-age=10800, pre-check=10800
Last-Modified: Tue, 20 Jul 2004 22:34:56 GMT
Set-Cookie: Referal_URL=deleted; expires=Wed, 23-Jul-2003 22:16:00 GMT; path=/; domain=.domain-name.com
Content-Encoding: gzip
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=UTF-8

10:26 pm on July 22, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


> check the cache-control headers on image requests.

Both of those header checks look like they were for page content, not images, because of the text/html MIME-types...

You have different operating systems, and different php versions there as well as Apache 1.3 vs. 2.0

Jim

10:41 pm on July 22, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 29, 2003
posts:236
votes: 0


Sorry I misread your post. Here are the headers for an image:

OLD VPS SERVER

HTTP/1.1 200 OK
Date: Thu, 22 Jul 2004 22:38:33 GMT
Server: Apache/1.3.22 (Unix) PHP/4.3.1 mod_perl/1.26 FrontPage/5.0.2.2623 AuthMySQL/2.20 mod_ssl/2.8.5 OpenSSL/0.9.6a
Last-Modified: Tue, 04 May 2004 21:26:48 GMT
ETag: "111df4-236d-40980a98"
Accept-Ranges: bytes
Content-Length: 9069
Keep-Alive: timeout=120, max=100
Connection: Keep-Alive
Content-Type: image/jpeg

NEW DEDICATED

HTTP/1.1 200 OK
Date: Thu, 22 Jul 2004 22:37:55 GMT
Server: Apache/2.0.46 (Red Hat)
Last-Modified: Tue, 04 May 2004 21:26:48 GMT
ETag: "60689e-236d-f7a5d600"
Accept-Ranges: bytes
Content-Length: 9069
Connection: close
Content-Type: image/jpeg

10:43 pm on July 22, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 1, 2003
posts:120
votes: 0


keep-alive vs "close every time" is probably at fault here.
10:52 pm on July 22, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 29, 2003
posts:236
votes: 0


Thanks - it looks like the keep-alive was the issue! I turned it on in httpd.conf and now the dedicated server is a fraction of a second faster.

Thank You!

1:30 pm on July 23, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:May 4, 2004
posts:525
votes: 0


fyi

w/o the keepalive enabled the browser needs to open a new socket connection to the server each time it wants to request a file, making each request slower. With keepalive enabled the browser re-uses the first connection for a certain time (you can control this in your server), so if you have 30 images on a html page, the browser can use the same connection for each of the images, which is considerably faster than 30 individual requests.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members