PDA

View Full Version : no server expert - really need help


mark58
Wed 12th Dec '01, 10:12pm
some basics

dedicated server - i have full access, just don't know much about it so pretty useless

p-3 - 1,000 mhz
1024 megs of ram
20 gig hdd
PHP 4 w/ zend optimizer (not sure how to tell the version)
mysql (not sure how to tell the version)


i have read some of the posts about server and the extended-status but when i put it into my telnet program i am only able to capture what is on the screen, i can't scroll up to get all the info.

problem is - i have around 80-140 members on at one time. server load will spike up and give the server busy message. also the load seems to be around 2-3 all the time. i have figured out that the max_connection=500

here is my top output:

9:10pm up 41 days, 21:16, 1 user, load average: 3.87, 4.27, 3.74
282 processes: 162 sleeping, 15 running, 105 zombie, 0 stopped
CPU states: 83.8% user, 9.4% system, 0.0% nice, 6.6% idle
Mem: 511312K av, 418128K used, 93184K free, 0K shrd, 2084K buff
Swap: 530104K av, 285420K used, 244684K free 141120K cached


(the CPU states: *** user is the one that seems to spike)
(that top status was taken with around 135 members online)


any help in getting things to run smoother would be great. i would like to promote the site even more and generate more traffic but i am afraid the server won't handle it

thanks

eva2000
Wed 12th Dec '01, 10:22pm
a VO server ?

replace your /etc/my.cnf file contents with

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable = max_connections=550
set-variable = key_buffer=16M
set-variable = join_buffer=5M
set-variable = record_buffer=5M
set-variable = sort_buffer=8M
set-variable = table_cache=1024
set-variable = thread_cache_size=256

[myisamchk]
set-variable = key_buffer=384M
set-variable = sort_buffer=384M
set-variable = read_buffer=16M
set-variable = write_buffer=16M
and restart mysql

eva2000
Wed 12th Dec '01, 10:23pm
Originally posted by mark58
some basics

dedicated server - i have full access, just don't know much about it so pretty useless

p-3 - 1,000 mhz
1024 megs of ram
20 gig hdd
PHP 4 w/ zend optimizer (not sure how to tell the version)
mysql (not sure how to tell the version)


i have read some of the posts about server and the extended-status but when i put it into my telnet program i am only able to capture what is on the screen, i can't scroll up to get all the info.

problem is - i have around 80-140 members on at one time. server load will spike up and give the server busy message. also the load seems to be around 2-3 all the time. i have figured out that the max_connection=500

here is my top output:

9:10pm up 41 days, 21:16, 1 user, load average: 3.87, 4.27, 3.74
282 processes: 162 sleeping, 15 running, 105 zombie, 0 stopped
CPU states: 83.8% user, 9.4% system, 0.0% nice, 6.6% idle
Mem: 511312K av, 418128K used, 93184K free, 0K shrd, 2084K buff
Swap: 530104K av, 285420K used, 244684K free 141120K cached


(the CPU states: *** user is the one that seems to spike)
(that top status was taken with around 135 members online)


any help in getting things to run smoother would be great. i would like to promote the site even more and generate more traffic but i am afraid the server won't handle it

thanks just rechecked that top stats and it looks like you're swapping to disk alot 280MB+! :eek:

you seem to only have 512mb not 1 gb ram ?

mark58
Wed 12th Dec '01, 10:25pm
eva2000 thanks for your quick reply

i can handle html, learning php, have fun with the template etc but this server stuff i am way over my head

what do you mean by VO server?

i got it from interserver.net

how do i replace the contents of my /etc/my.cnf file

never played with it before and not much of a telnet expert. got most of what i learn from you and the posts on here. got the basics but not much more!

thanks again for your fast reply

mark58
Wed 12th Dec '01, 10:27pm
Originally posted by eva2000
just rechecked that top stats and it looks like you're swapping to disk alot 280MB+! :eek:

you seem to only have 512mb not 1 gb ram ?


that is what i thought only 512 mb rather than 1gb ram. on my server web hosting control panel (not sure what is it offically called) it lists 1024 megs of ram not 512. is there somethign in the setup so it is only using 512?

thanks

mark58
Wed 12th Dec '01, 10:28pm
the VB database is around 500 megs. 10,000 members not all active of cource. 200,000+ posts

mark58
Wed 12th Dec '01, 10:29pm
latest top status

9:28pm up 41 days, 21:34, 1 user, load average: 2.76, 2.86, 3.30
288 processes: 180 sleeping, 2 running, 106 zombie, 0 stopped
CPU states: 63.0% user, 6.7% system, 0.0% nice, 30.2% idle
Mem: 511312K av, 456304K used, 55008K free, 0K shrd, 1892K buff
Swap: 530104K av, 285420K used, 244684K free 173168K cached

eva2000
Wed 12th Dec '01, 10:36pm
i'd contact your web host and ask what's up with the memory first

as to replacing my.cnf file you'll need to use pico editor so

1. log into telnet
2. switch to root user

su -

enter root password
3. chance to /etc directory

cd /etc

4. rm existing my.cnf file

rm my.cnf

5. create new my.cnf with pico

pico my.cnf

6. copy and paste my above my.cnf lines and then save file

ctrl-X

7. restart mysql

mark58
Wed 12th Dec '01, 10:40pm
thanks for the outline. i am contacting them right now about the ram issue. lucky they are on ICQ


probably silly questions to you but

should i shutdown my board when i do this?

will restarting mysql cause any errors if things were being written to the database at the time of the reset?

mark58
Wed 12th Dec '01, 10:41pm
this is off my server setup info page from the web hosting control panel. does that mean i have 512 megs ram and 522 megs of HDD space set aside?!?!


Processor Info

Processor #1 Vendor: GenuineIntel
Processor #1 Name: Pentium III (Coppermine)
Processor #1 speed: 1002.288 MHz
Processor #1 cache size: 256 KB


Memory Information
Memory: 511120k/522228k available (1183k kernel code, 10724k reserved, 433k data, 192k init, 0k highmem)



Current Memory Usage
total used free shared buffers cached
Mem: 511312 423552 87760 0 2084 181696
-/+ buffers/cache: 239772 271540
Swap: 530104 285380 244724
Total: 1041416 708932 332484

TommyBALL
Wed 12th Dec '01, 10:42pm
As long as you shutdown mysql, and don't kill it, it will exit gracfully and write all data to disk before exiting :)

mark58
Wed 12th Dec '01, 10:58pm
so restart services in the web hosting control panel should work fine. don't you just love guys that shouldn't be hosting their own sites but cause of how well vbulletin works the site took off so they needed a dedicated server! don't blame me blame vbulletin LOL

thanks

mark58
Wed 2nd Jan '02, 6:09pm
current top stats

5:01pm up 7 days, 18:16, 1 user, load average: 6.16, 4.13, 3.42
192 processes: 175 sleeping, 6 running, 11 zombie, 0 stopped
CPU states: 90.2% user, 9.7% system, 0.0% nice, 0.0% idle
Mem: 769096K av, 748176K used, 20920K free, 0K shrd, 2948K buff
Swap: 530104K av, 17204K used, 512900K free 379436K cache


the load is still going pretty nutz considering

any ideas?

eva2000
Wed 2nd Jan '02, 6:14pm
Originally posted by mark58
this is off my server setup info page from the web hosting control panel. does that mean i have 512 megs ram and 522 megs of HDD space set aside?!?!


Processor Info

Processor #1 Vendor: GenuineIntel
Processor #1 Name: Pentium III (Coppermine)
Processor #1 speed: 1002.288 MHz
Processor #1 cache size: 256 KB


Memory Information
Memory: 511120k/522228k available (1183k kernel code, 10724k reserved, 433k data, 192k init, 0k highmem)



Current Memory Usage
total used free shared buffers cached
Mem: 511312 423552 87760 0 2084 181696
-/+ buffers/cache: 239772 271540
Swap: 530104 285380 244724
Total: 1041416 708932 332484 from that i see only 512mb of physically memory on the server

eva2000
Wed 2nd Jan '02, 6:15pm
Originally posted by mark58
current top stats

5:01pm up 7 days, 18:16, 1 user, load average: 6.16, 4.13, 3.42
192 processes: 175 sleeping, 6 running, 11 zombie, 0 stopped
CPU states: 90.2% user, 9.7% system, 0.0% nice, 0.0% idle
Mem: 769096K av, 748176K used, 20920K free, 0K shrd, 2948K buff
Swap: 530104K av, 17204K used, 512900K free 379436K cache


the load is still going pretty nutz considering

any ideas? see you have 768mb of ram now :)

looks like you're swapping to disk alot with 17MB used... might need to look at your memory usage and mysql memory buffer settings in your my.cnf file and your mysql extended-status output

mark58
Wed 2nd Jan '02, 6:26pm
getting the run around to get things bumped upto 1024 megs... but i hope soon i will have it


any suggestions on what/where to edit?

eva2000
Wed 2nd Jan '02, 6:28pm
Originally posted by mark58
getting the run around to get things bumped upto 1024 megs... but i hope soon i will have it


any suggestions on what/where to edit? to get to the bottom of whether it's a mysql memory usage issue can you please provide the following

1. your server specs, such as mysql and php version
2. if possible how mysql was compiled/installed
3. your top stats
4. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf if on Windows server if you don't have that file you need to log into telnet and as root user type

mysqladmin -u root -p variables

copy and paste output here

5. your mysql extended-status output either still telnet as root user type

mysqladmin -u root -p extended-status

copy and paste output here

or preferred is to installed extended-status output script which is located at http://vbulletin.com/forum/showthread.php?threadid=3477

and post url to that here

6. oh and is your vB the only thing on the server? or other scripts? sites?

7. how many average and max concurrent users on your vB forum ?

mark58
Wed 2nd Jan '02, 6:49pm
1. your server specs, such as mysql and php version

how do i get these?

2. if possible how mysql was compiled/installed

not sure it came setup on the server

3. your top stats

--->i will post it when i post the above stats

4. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf if on Windows server if you don't have that file you need to log into telnet and as root user type

--->on a unix so /etc/my.cnf

mysqladmin -u root -p variables

copy and paste output here

---> got a problem, put in the mysqladmin -u root -p variables and it runs but i can only access what is on the screen. there is many screen fulls of info that i can't get ot

5. your mysql extended-status output either still telnet as root user type

mysqladmin -u root -p extended-status

copy and paste output here

or preferred is to installed extended-status output script which is located at http://vbulletin.com/forum/showthread.php?threadid=3477

and post url to that here

6. oh and is your vB the only thing on the server? or other scripts? sites?

---> dedicated server with only this single site on it, i do have vbportals installed and a mailing list program but the mailing list program is not very active at all.

7. how many average and max concurrent users on your vB forum ?

--->don't know, if you look above in this thread you gave me what to put in the my.cnf file

mark58
Wed 2nd Jan '02, 6:52pm
5:54pm up 7 days, 19:09, 0 users, load average: 3.04, 2.10, 1.90
142 processes: 129 sleeping, 2 running, 11 zombie, 0 stopped
Mem: 769096K av, 648528K used, 120568K free, 0K shrd, 3112K buff
Swap: 530104K av, 17204K used, 512900K free 394400K cached

PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
704 nobody 12 0 9632 9352 2788 R 0 13.3 1.2 0:22 httpd

Wed Jan 2 17:54:43 EST 2002

eva2000
Wed 2nd Jan '02, 6:55pm
1. install http://phpsysinfo.sourceforge.net/ and post url here

2. well you could ask your web host .. not really needed right now though

4. no my.cnf file at /etc ?? if so you can use mouse to highlight the what's on screen or adjust the window/telnet's displayable lines

or just post the values from the out put for

max_connections
join_buffer
key_buffer
sort_buffer
table_cache
thread_cache_size
max_user_connections
slow_queries
connect_timeout
thread_stack
wait_timeout
log
log_update
log_bin
open_files_limit

5. ???

6. what's you average current active users displayed on your vB and max ?

mark58
Wed 2nd Jan '02, 8:33pm
1. install http://phpsysinfo.sourceforge.net/ and post url here

http://66.78.44.8/stats/phpSysInfo-1.9/index.php

2. well you could ask your web host .. not really needed right now though

4. no my.cnf file at /etc ?? if so you can use mouse to highlight the what's on screen or adjust the window/telnet's displayable lines

or just post the values from the out put for



these are the settings:
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable = max_connections=550
set-variable = key_buffer=16M
set-variable = join_buffer=5M
set-variable = record_buffer=5M
set-variable = sort_buffer=8M
set-variable = table_cache=1024
set-variable = thread_cache_size=256

[myisamchk]
set-variable = key_buffer=384M
set-variable = sort_buffer=384M
set-variable = read_buffer=16M
set-variable = write_buffer=16M

5. ???

6. what's you average current active users displayed on your vB and max ?

right now 120 max 153 but that is because when it hits 140-ish things really bog down

eva2000
Wed 2nd Jan '02, 9:29pm
just one more info needed

your mysql extended-status output either still telnet as root user type

mysqladmin -u root -p extended-status

copy and paste output here

or preferred is to installed extended-status output script which is located at http://vbulletin.com/forum/showthread.php?threadid=3477

and post url to that here

mark58
Wed 2nd Jan '02, 9:31pm
Originally posted by eva2000
just one more info needed

your mysql extended-status output either still telnet as root user type

mysqladmin -u root -p extended-status

copy and paste output here

or preferred is to installed extended-status output script which is located at http://vbulletin.com/forum/showthread.php?threadid=3477

and post url to that here




8:33pm up 7 days, 21:48, 1 user, load average: 4.79, 3.40, 2.55
152 processes: 140 sleeping, 2 running, 10 zombie, 0 stopped
Mem: 769096K av, 727044K used, 42052K free, 0K shrd, 2868K buff
Swap: 530104K av, 18216K used, 511888K free 557212K cached

PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
10456 nobody 16 0 5764 5484 2732 R 0 24.0 0.7 0:00 httpd

Wed Jan 2 20:33:36 EST 2002




http://66.78.44.8/stat.php

eva2000
Wed 2nd Jan '02, 9:39pm
be sure to edit the line with

$mysqllogin = "-uuser -ppassword";

with your mysql root username and password in bold

mark58
Wed 2nd Jan '02, 9:40pm
sorry about that

it is done

i will be on here for most of the night so if there is anything else you need to to check just let me know

thanks for your help

eva2000
Wed 2nd Jan '02, 9:46pm
i noticed your mysql extended-status output shows table_cache 100% used at 64 which is different from your my.cnf table cache seting at 1024 they should be the same but they're not suggesting either the my.cnf has not been read i.e. mysql was not restarted after you created my.cnf or that some auto boot script for mysql is starting mysql and passing the settings via command line

as root user in shell type

locate my.cnf

and what do you find ? only 1 copy ?

mark58
Wed 2nd Jan '02, 9:59pm
Originally posted by eva2000
i noticed your mysql extended-status output shows table_cache 100% used at 64 which is different from your my.cnf table cache seting at 1024 they should be the same but they're not suggesting either the my.cnf has not been read i.e. mysql was not restarted after you created my.cnf or that some auto boot script for mysql is starting mysql and passing the settings via command line

as root user in shell type

locate my.cnf

and what do you find ? only 1 copy ?


/usr/local/cpanel/whostmgr/my.cnf
/etc/my.cnf
/.my.cnf

got these! any suggestions or ideas?

mark58
Wed 2nd Jan '02, 10:42pm
whenever i edit etc/my.cnf and put in the needed changes and then restart mysql the my.cnf settings go back to the default. contact the host of my dedicated server to see what i can do

Chris Schreiber
Wed 2nd Jan '02, 11:10pm
You probably need to edit your /usr/local/cpanel/whostmgr/my.cnf file, and then copy that to /etc/my.cnf. IIRC, cpanel uses this file and copies it to /etc/my.cnf

mark58
Thu 3rd Jan '02, 12:33am
thanks Chris i edited the /usr/local/cpanel/whostmgr/my.cnf file and copied that to the etc/ dir

then restarted mysql and everything seems to be running well with respect to the table cache. lots of room now

as you can see looking at the stats the server is still working pretty hard. i want to try to promote the site but don't think the server will be able to handle the traffic. any ideas how to get more out of htis server? i would have thought a 1 gig p3 with a good amount of ram would run better

Chris Schreiber
Thu 3rd Jan '02, 12:42am
Well you have plenty of free memory so I would start to increase the key_buffer value.

Your bottleneck is the CPU. If you are running with gzip or zlib compression enabled, you might want to disable these and monitor the performance, as both take added CPU cycles.

mark58
Thu 3rd Jan '02, 12:45am
900012K av, 826784K used, 73228K free,

doesn't look like i have much real memory left. alot of HDD memory i think is what is free right now.


i will turn off the gzip in the vb admin section and see how that helps

thanks

Chris Schreiber
Thu 3rd Jan '02, 12:55am
Originally posted by mark58
900012K av, 826784K used, 73228K free,

doesn't look like i have much real memory left. alot of HDD memory i think is what is free right now.

Actually those numbers don't show the whole picture. You have ~70MB of real memory free, and part of the used memory is probably being used for disk cache.

For example, on my server:

Mem: 1027808K av, 1014836K used, 12972K free, 25220K shrd, 116860K buff
Swap: 1052216K av, 116K used, 1052100K free 590784K cached


I only have ~10MB of real memory free, out of 1GB of RAM. However, you can see I have almost 590MB of RAM being used as a disk cache, which could be used for programs. Also, my swap space isn't being actively used.

mark58
Thu 3rd Jan '02, 1:23am
things appear to be running even slower. i have around 90 users on right now and the server is hitting around 2-2.5. it didn't usually hit that much until around 120 users. could the stats on the first page not be right for my server? just trying to figure all this out since it is still new to me.

also how are some of these sites handling 2-300 users on at the same time? i hit 140 and things got pretty heavy on the server.

Chris Schreiber
Thu 3rd Jan '02, 1:31am
Originally posted by mark58
also how are some of these sites handling 2-300 users on at the same time? i hit 140 and things got pretty heavy on the server.

Well with the number of users you have, you should be looking into a dual CPU system, and SCSI hard drives. Both would make a world of difference.

mark58
Thu 3rd Jan '02, 1:33am
i was told the dual won't really do much in the way of better preformance. that is from the sales guy who would have made more $ selling me the dual system. i am really new to servers are you can tell so would the dual make a significant difference?

eva2000
Thu 3rd Jan '02, 9:37am
dual does make alot of difference just check out my forums at Animeboards.com :D

with cpanel what Chris suggested will help properly set my.cnf file..

if you're getting alof of traffic it could be analog and webalizer processing large web log files that are causing your cpu loads to increase...

Dave#
Thu 3rd Jan '02, 11:58am
Originally posted by Chris Schreiber


Well with the number of users you have, you should be looking into a dual CPU system, and SCSI hard drives. Both would make a world of difference.


I can concur about scsi drives - unbelievable difference on my system :)


Still having problems getting my server to use much memory though

247 users

capacity 22% free 986.22 MB used 279.74 MB total 1.24 GB

Load Averages 1.09 1.00 1.15

mark58
Thu 3rd Jan '02, 12:01pm
Originally posted by eva2000
if you're getting alof of traffic it could be analog and webalizer processing large web log files that are causing your cpu loads to increase...

how would i turn these off?

TurboFC3S
Thu 3rd Jan '02, 12:04pm
compression is a CPU hog period. I would doubt that a single CPU system could compress for a site with the traffic you say. My server - see sig - is having problems running mod-gzip for about double the traffic you have.

Try turning off compression and then monitor things. If that does the trick you can either get a bigger server, or a second server like the one you already have and set it up as a dedicated database box ... then use your current one for the front-end webserver.

You may have said in your thread, but are you using mod_gzip to compress everything, or zlib through the vB admin panel? If you're using mod_gzip, you can try editing the mod_gzip.conf and turn off compression for everything but php files.

TurboFC3S
Thu 3rd Jan '02, 12:07pm
Originally posted by Dave#
I can concur about scsi drives - unbelievable difference on my system :)

Still having problems getting my server to use much memory though

247 users

capacity 22% free 986.22 MB used 279.74 MB total 1.24 GB

Load Averages 1.09 1.00 1.15

Do you have compression on? What are your MySQL settings? I'm curious how you're using so little memory.

Even when I ran my site from a single CPU box with IDE drives, disk access was never even close to a bottleneck. It was ALWAYS cpu. SCSI stuff is nice, mainly because it's a lot more reliable.

Dave#
Thu 3rd Jan '02, 12:07pm
compression is a CPU hog period. I would doubt that a single CPU system could compress for a site with the traffic you say. My server - see sig - is having problems running mod-gzip for about double the traffic you have.

There must be something amiss with your system then. I use Mod_GZIP and ZLIB with minimal overhead . . .

Dave#
Thu 3rd Jan '02, 12:09pm
Originally posted by TurboFC3S


Do you have compression on? What are your MySQL settings? I'm curious how you're using so little memory.

Even when I ran my site from a single CPU box with IDE drives, disk access was never even close to a bottleneck. It was ALWAYS cpu. SCSI stuff is nice, mainly because it's a lot more reliable.

http://cpfc.org/status/index.php


compression is on

http://cpfc.org/status/mysql.php

TurboFC3S
Thu 3rd Jan '02, 12:55pm
Originally posted by Dave#
There must be something amiss with your system then. I use Mod_GZIP and ZLIB with minimal overhead . . .

Why both?

I think something is amiss with my system. But I'll start a new thread about that ... don't want to bogart somebody elses thread.