Welcome to the Geeks & God Static Archive. Read more »

Shalom From Jerusalem

Joined: 11/28/2008

Shalom from Jerusalem,

Back in 2004 when the second intifada started, I saw the need to provide a double service.

To combine an honest source of news from Jerusalem and a place to shop in safety for the thousands who used to visit Israel but because of the conflict erupting were unable - So I built my first site The Jerusaelm Christian gift shop

Now after 3 years of customizing - as the site grows, it slows! (talking Pageload times)

My questions:

1) is there an obvious way to get the page loading quicker while keeping the same functions? Now it's painfully slow, with the homepage taking about 40secs on a ISDN 128k connection.

2)
Would a faster server be an obvious solution? and what kind of specification would I need to look at as a server upgrade.

Thank you Christian Web Masters for providing the service and space to ask these rather long questions.

All responses to the above would be most appreciated

Joined: 11/28/2008
What sort of setup are you on

What sort of setup are you on at the moment - are you on a dedicated server or shared hosting? The speed report for your website seems to agree with your 40 second estimate for ISDN:

http://www.websiteoptimization.com/service...emgiftshop.com/

QUOTE
ISDN 128K - 45.72 seconds

I see you are with HostDime - I have accounts with them too. Running a tracert to your site and mine shows the same time - so can we assume there isn't a problem with the network.

There seemed to be a large lag between request and response - so the speed decrease could be due to the PHP script you are using having a problem in it causing it to take ages to return output or you being on a busy shared server with not enough resources to cope.

You can ask HostDime support if your server is busy and they may move you to a different one. To check if you PHP script is taking too long to process you need to modify it to store the time when it starts, the time when it ends, calculate the difference and output it at the end of execution, which can all be placed in index.php.

Hope that helps.

~Andrew~

Joined: 11/28/2008
Shalom Andrew,Thank you for

Shalom Andrew,

Thank you for taking the time to check this out

I have a dedicated server on hostdime.com with some 15 other accounts that use hardly any CPU

The processor is a 1.6 GHZ with half a Gig ram

The update that seems to have caused the slowdown is the News page that also loads into the sidebar on all pages, however when I disabled that function on the home page there was a decrease of only 2 secs from 40 on pageload.

I believe a faster server is in order but am not sure really of the spec needed to speed pageload down to a more 'bearable' time.

Joined: 11/28/2008
I'm not 100% sure on that.

I'm not 100% sure on that. The page takes a few seconds then loads fairly fast for me (on 8Mbps broadband). I just tried it on a different computer which has a 40Mbps fibre connection - there was a 20 second wait then all the content loaded at once.

This means it is either a problem with server load (solve by increasing resources such as RAM or processors) or with your script taking a long time to exectue.

Since you are on dedicated you should be able to SSH in and run a command that can tell you if the server is overloaded. If you SSH with a client like Putty (assuming you are on Windows?), then run 'top', copy and paste it here would be helpful.

Here's an example from one of my servers:

QUOTE
top - 20:09:31 up 53 days, 3:13, 7 users, load average: 0.00, 0.00, 0.00
Tasks: 209 total, 1 running, 205 sleeping, 2 stopped, 1 zombie
Cpu(s): 0.9% us, 0.1% sy, 0.0% ni, 99.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 8310296k total, 7143908k used, 1166388k free, 241016k buffers
Swap: 2031608k total, 164k used, 2031444k free, 5774856k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13289 ****** 15 0 2476 1108 804 R 2 0.0 0:00.03 top
1 root 16 0 1900 552 472 S 0 0.0 0:05.51 init
2 root RT 0 0 0 0 S 0 0.0 0:00.91 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.07 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.79 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.09 ksoftirqd/1
6 root RT 0 0 0 0 S 0 0.0 0:00.76 migration/2
7 root 34 19 0 0 0 S 0 0.0 0:00.06 ksoftirqd/2
8 root RT 0 0 0 0 S 0 0.0 0:00.72 migration/3
9 root 34 19 0 0 0 S 0 0.0 0:00.04 ksoftirqd/3
10 root 5 -10 0 0 0 S 0 0.0 0:00.54 events/0
11 root 5 -10 0 0 0 S 0 0.0 0:00.59 events/1
12 root 5 -10 0 0 0 S 0 0.0 0:00.50 events/2
13 root 5 -10 0 0 0 S 0 0.0 0:00.49 events/3
14 root 7 -10 0 0 0 S 0 0.0 0:00.00 khelper
15 root 15 -10 0 0 0 S 0 0.0 0:00.00 kacpid
47 root 5 -10 0 0 0 S 0 0.0 0:00.00 kblockd/0

The interesting thing is the load average - you can see on my server it is 0 for the last four. Anything over 1 is probably a problem, and over 4 definitely. That will also tell you how much RAM you have free.

If it turns out your server load is fine then I would say it is a problem with the script - if you have modified it you may have inadvertently put in something which takes a long time to execute.

Another thing to consider is the other accounts on the server - are any of them really busy sites which could be hogging resources, or could be running a CPU intensive script. One way to find out is to find out which process(es) are taking up resources by looking with top. The command will keep refreshing - you should see any programs that are hogging resources will stay at the top. Try looking at it when you've just visited the site too.

Good luck - if we can't help you here I suggest you might ask HostDime as their staff could access your server more easily and are much better at this sort of thing than I am!

~Andrew~

Joined: 11/28/2008
Thank you Andrew,Your input

Thank you Andrew,

Your input is much appreciated.

I have taken on another dedicated server with more RAM and a faster connection and removed a couple of scripts running on the homepage.

Seems to be loading better now plenty of room for improvement.

Your input would be received most thankfully

QUOTE(Nexonen @ Oct 3 2007, 02:16 PM)
I'm not 100% sure on that. The page takes a few seconds then loads fairly fast for me (on 8Mbps broadband). I just tried it on a different computer which has a 40Mbps fibre connection - there was a 20 second wait then all the content loaded at once.

This means it is either a problem with server load (solve by increasing resources such as RAM or processors) or with your script taking a long time to exectue.

Since you are on dedicated you should be able to SSH in and run a command that can tell you if the server is overloaded. If you SSH with a client like Putty (assuming you are on Windows?), then run 'top', copy and paste it here would be helpful.

Here's an example from one of my servers:

QUOTE
top - 20:09:31 up 53 days, 3:13, 7 users, load average: 0.00, 0.00, 0.00
Tasks: 209 total, 1 running, 205 sleeping, 2 stopped, 1 zombie
Cpu(s): 0.9% us, 0.1% sy, 0.0% ni, 99.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 8310296k total, 7143908k used, 1166388k free, 241016k buffers
Swap: 2031608k total, 164k used, 2031444k free, 5774856k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13289 ****** 15 0 2476 1108 804 R 2 0.0 0:00.03 top
1 root 16 0 1900 552 472 S 0 0.0 0:05.51 init
2 root RT 0 0 0 0 S 0 0.0 0:00.91 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.07 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.79 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.09 ksoftirqd/1
6 root RT 0 0 0 0 S 0 0.0 0:00.76 migration/2
7 root 34 19 0 0 0 S 0 0.0 0:00.06 ksoftirqd/2
8 root RT 0 0 0 0 S 0 0.0 0:00.72 migration/3
9 root 34 19 0 0 0 S 0 0.0 0:00.04 ksoftirqd/3
10 root 5 -10 0 0 0 S 0 0.0 0:00.54 events/0
11 root 5 -10 0 0 0 S 0 0.0 0:00.59 events/1
12 root 5 -10 0 0 0 S 0 0.0 0:00.50 events/2
13 root 5 -10 0 0 0 S 0 0.0 0:00.49 events/3
14 root 7 -10 0 0 0 S 0 0.0 0:00.00 khelper
15 root 15 -10 0 0 0 S 0 0.0 0:00.00 kacpid
47 root 5 -10 0 0 0 S 0 0.0 0:00.00 kblockd/0

The interesting thing is the load average - you can see on my server it is 0 for the last four. Anything over 1 is probably a problem, and over 4 definitely. That will also tell you how much RAM you have free.

If it turns out your server load is fine then I would say it is a problem with the script - if you have modified it you may have inadvertently put in something which takes a long time to execute.

Another thing to consider is the other accounts on the server - are any of them really busy sites which could be hogging resources, or could be running a CPU intensive script. One way to find out is to find out which process(es) are taking up resources by looking with top. The command will keep refreshing - you should see any programs that are hogging resources will stay at the top. Try looking at it when you've just visited the site too.

Good luck - if we can't help you here I suggest you might ask HostDime as their staff could access your server more easily and are much better at this sort of thing than I am!