Results 1 to 9 of 9
Thread: Slow loading website
-
08-06-2007, 09:11 AM #1Junior Guru Wannabe
- Join Date
- Jun 2006
- Posts
- 35
Slow loading website
I got problems with sql query then making slowly loading website, not sure that problems in configuration server or coding website.
Test query:
Page generation time: 3.5713s (PHP: 16% - SQL: 84%) - SQL queries: 35 - GZIP enabled - Debug onNeed somebody help? Thanks!
-
08-06-2007, 10:02 AM #2Web Hosting Master
- Join Date
- Feb 2006
- Location
- North West England
- Posts
- 609
What is the load on the server? Is it Linux or Windows? Is it the only thing running on that server?
-
08-06-2007, 10:06 AM #3Junior Guru Wannabe
- Join Date
- Jun 2006
- Posts
- 35
Mysql query loading:
Page generation time: 3.5713s (PHP: 16% - SQL: 84%) - SQL queries: 35 - GZIP enabled - Debug on
Running on linux!
How can I test that my server was configed right? And how to check the loading speed of server?
Thanks!
-
08-06-2007, 10:09 AM #4Web Hosting Master
- Join Date
- Feb 2006
- Location
- North West England
- Posts
- 609
When i say load, i mean the server load, ie paste the top 5/6 lines of top. This will generally tell you how busy the server is, how much memory is being used, and how much swap is being used.
-
08-06-2007, 10:19 AM #5Web Hosting Master
- Join Date
- Sep 2004
- Posts
- 760
Login to ssh,check
top
cat /proc/cpuinfo
free -m
post here,that we can help you more.
-
08-06-2007, 10:37 AM #6Junior Guru Wannabe
- Join Date
- Jun 2006
- Posts
- 35
top - 22:36:21 up 113 days, 8:15, 1 user, load average: 0.22, 0.20, 0.19
Tasks: 128 total, 1 running, 124 sleeping, 0 stopped, 3 zombie
Cpu(s): 12.6% us, 3.8% sy, 0.0% ni, 83.4% id, 0.2% wa, 0.0% hi, 0.0% si
Mem: 2074924k total, 2012692k used, 62232k free, 73880k buffers
Swap: 2096440k total, 144k used, 2096296k free, 1485340k cached
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 35
model name : Dual Core AMD Opteron(tm) Processor 175
stepping : 2
cpu MHz : 2195.189
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext lm 3dnowext 3dnow pni
bogomips : 4392.55
processor : 1
vendor_id : AuthenticAMD
cpu family : 15
model : 35
model name : Dual Core AMD Opteron(tm) Processor 175
stepping : 2
cpu MHz : 2195.189
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext lm 3dnowext 3dnow pni
bogomips : 4388.39
free -m
total used free shared buffers cached
Mem: 2026 1977 49 0 72 1451
-/+ buffers/cache: 453 1573
Swap: 2047 0 2047
These all information. Thank for helping!
-
08-06-2007, 11:04 AM #7Web Hosting Master
- Join Date
- Feb 2006
- Location
- North West England
- Posts
- 609
Hmmm, there isn't really anything there that shouts out as being wrong. Looks like you are either.
a) Tweak your my.cnf
b) Look at your SQL commands
c) Both a and b
What is the application?
-
08-06-2007, 11:17 AM #8Junior Guru Wannabe
- Join Date
- Jun 2006
- Posts
- 35
Dont understand exactly what you mean for tweak my.cnf and what the application is?
my.cnf:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
query_cache_limit=8M
query_cache_size=128M
query_cache_type=1
max_connections=1000
max_user_connections=20
interactive_timeout=20
wait_timeout=20
connect_timeout=10
thread_cache_size=128
key_buffer=512M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=8M
read_buffer_size=8M
max_connect_errors=999
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=4
myisam_sort_buffer_size=64M
#log-bin
server-id=1
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192
[mysqldump]
quick
max_allowed_packet=16M
[mysql]
no-auto-rehash
#safe-updates
[isamchk]
key_buffer=32M
sort_buffer=32M
read_buffer=16M
write_buffer=16M
[myisamchk]
key_buffer=32M
sort_buffer=32M
read_buffer=16M
write_buffer=16M
--skip-name-resolve
Is it right?
-
08-06-2007, 01:30 PM #9Web Hosting Master
- Join Date
- Sep 2004
- Posts
- 760
Both your server load and configure files seem ok,it should be your PHP scripts problem,try to optimize it,with 35 SQL quries,i think it is troppo.