Quote:
Originally Posted by snakes1100
Well each OS is different, but you can cat /proc/sys/kernel/shmmax, if that spits out an error saying it dont exist, ls /proc/sys/kernel and see what you have in there.
The default should spit back 33554432 = 32mb
You can try echo'ing in a larger value or change it in sysctl.conf
Im guessing that this may be a issue with the overall server of the vps and the ram not being allocated correctly to your vps, is the host US based or no?
|
You were correct the command did spit back 3355442
As far as changing this value goes, and I hate to be the noob here, but how do I go about that? and what exactly does it do?
--------------- Added [DATE]1204980409[/DATE] at [TIME]1204980409[/TIME] ---------------
Well last night at 1am (GMT) the server went down again with ~15 guest/users online
Got onto the host tech support guys and it seems that the reason for the outage was DB usage. This is the reply I got from them:
Quote:
Hello,
Following are the logs showing your database is creating load on main server. Please upgrade to dedicated server asap.
================================================== ==========================
-bash-3.00# mysqladmin pr
+--------+-----------+-----------+-----------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+-----------+-----------+-----------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| 112190 | eximstats | localhost | eximstats | Sleep | 717 | | |
| 207652 | therevco | localhost | therevco_vbMain | Query | 154 | Sending data | SELECT
post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS |
| 207656 | therevco | localhost | therevco_vbMain | Query | 140 | Locked | UPDATE user
SET lastactivity = 1204939692
WHERE userid = 142 |
| 207657 | therevco | localhost | therevco_vbMain | Query | 140 | Locked | SELECT moderator.*, user.username,
IF(user.displaygroupid = 0, user.usergroupid, user.displaygroup |
| 207660 | therevco | localhost | therevco_vbMain | Query | 140 | Locked | UPDATE user
SET lastactivity = 1204939718
WHERE userid = 142 |
| 207664 | therevco | localhost | therevco_vbMain | Query | 136 | Locked | SELECT moderator.*, user.username,
IF(user.displaygroupid = 0, user.usergroupid, user.displaygroup |
| 207665 | therevco | localhost | therevco_vbMain | Query | 138 | Locked | SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF |
| 207666 | therevco | localhost | therevco_vbMain | Query | 137 | Locked | SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF |
| 207668 | therevco | localhost | therevco_vbMain | Query | 132 | Locked | SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF |
| 207669 | therevco | localhost | therevco_vbMain | Query | 126 | Locked | SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF |
| 207670 | therevco | localhost | therevco_vbMain | Query | 122 | Locked | SELECT moderator.*, user.username,
IF(user.displaygroupid = 0, user.usergroupid, user.displaygroup |
| 207671 | therevco | localhost | therevco_vbMain | Query | 122 | Locked | SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF |
| 207673 | therevco | localhost | therevco_vbMain | Query | 102 | Locked | SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF |
| 207674 | therevco | localhost | therevco_vbMain | Query | 26 | Sending data | SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache |
| 207675 | therevco | localhost | therevco_vbMain | Query | 26 | Sending data | SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache |
| 207676 | therevco | localhost | therevco_vbMain | Query | 26 | Sending data | SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache |
| 207677 | therevco | localhost | therevco_vbMain | Query | 19 | Sending data | SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache |
| 207678 | therevco | localhost | therevco_vbMain | Query | 8 | Sending data | SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache |
| 207679 | root | localhost | | Query | 0 | | show processlist |
| 207680 | root | localhost | | Sleep | 1 | | |
+--------+-----------+-----------+-----------------+---------+------+--------------+---------------------------------------------------------------------------------------
|
Now to me that is just a list of SQL queries fired at the DB, and doesnt show how/why SQL is loaded. However I do conceed that MySQL was caning the server as at the time I was running "top" and mysqld was obviously extremely busy. Problem is I have no logical explanation.
I know I keep banging on about this but I just can't see how 15 users are generating the same load as 170.
The following is a dump from mysqlreport ( http://www.vbulletin.com/forum/showthread.php?t=175177)
Quote:
MySQL 5.0.45-community uptime 0 10:26:4 Sat Mar 8 12:30:48 2008
__ Key __________________________________________________ _______________
Buffer used 6.54M of 8.00M %Used: 81.76
Current 7.99M %Usage: 99.85
Write hit 41.35%
Read hit 97.75%
__ Questions __________________________________________________ _________
Total 324.62k 8.6/s
DMS 293.14k 7.8/s %Total: 90.30
Com_ 16.67k 0.4/s 5.13
COM_QUIT 14.81k 0.4/s 4.56
Slow (10) 10 0.0/s 0.00 %DMS: 0.00 Log: OFF
DMS 293.14k 7.8/s 90.30
SELECT 213.34k 5.7/s 65.72 72.78
INSERT 38.58k 1.0/s 11.89 13.16
UPDATE 35.87k 1.0/s 11.05 12.24
DELETE 4.43k 0.1/s 1.37 1.51
REPLACE 912 0.0/s 0.28 0.31
Com_ 16.67k 0.4/s 5.13
change_db 14.64k 0.4/s 4.51
optimize 379 0.0/s 0.12
show_create 364 0.0/s 0.11
__ SELECT and Sort __________________________________________________ ___
Scan 59.05k 1.6/s %SELECT: 27.68
Range 41.03k 1.1/s 19.23
Full join 32 0.0/s 0.01
Range check 0 0/s 0.00
Full rng join 0 0/s 0.00
Sort scan 21.22k 0.6/s
Sort range 18.87k 0.5/s
Sort mrg pass 2 0.0/s
__ Table Locks __________________________________________________ _______
Waited 98 0.0/s %Total: 0.02
Immediate 420.02k 11.2/s
__ Tables __________________________________________________ ____________
Open 64 of 64 %Cache: 100.00
Opened 4.74k 0.1/s
__ Connections __________________________________________________ _______
Max used 15 of 200 %Max: 7.50
Total 14.82k 0.4/s
__ Created Temp __________________________________________________ ______
Disk table 148 0.0/s
Table 9.63k 0.3/s Size: 32.0M
File 14 0.0/s
__ Threads __________________________________________________ ___________
Running 1 of 1
Cached 0 of 0 %Hit: 0.01
Created 14.82k 0.4/s
Slow 0 0/s
__ Aborted __________________________________________________ ___________
Clients 8 0.0/s
Connects 0 0/s
__ Bytes __________________________________________________ _____________
Sent 2.97G 79.2k/s
Received 72.78M 1.9k/s
__ InnoDB Buffer Pool __________________________________________________
Usage 576.00k of 8.00M %Used: 7.03
Read hit 97.39%
Pages
Free 476 %Total: 92.97
Data 35 6.84 %Drty: 0.00
Misc 1 0.20
Latched 0 0.00
Reads 690 0.0/s
From file 18 0.0/s 2.61
Ahead Rnd 2 0.0/s
Ahead Sql 0 0/s
Writes 157 0.0/s
Flushes 24 0.0/s
Wait Free 0 0/s
__ InnoDB Lock __________________________________________________ _______
Waits 0 0/s
Current 0
Time acquiring
Total 0 ms
Average 0 ms
Max 0 ms
__ InnoDB Data, Pages, Rows ____________________________________________
Data
Reads 34 0.0/s
Writes 19 0.0/s
fsync 14 0.0/s
Pending
Reads 0
Writes 0
fsync 0
Pages
Created 1 0.0/s
Read 34 0.0/s
Written 24 0.0/s
Rows
Deleted 0 0/s
Inserted 2 0.0/s
Read 2 0.0/s
Updated 0 0/s
|
This was taken around 10 hours after the server was rebooted early this morning.
--------------- Added [DATE]1204980466[/DATE] at [TIME]1204980466[/TIME] ---------------
This is the header from "top":
top - 12:47:06 up 10:56, 1 user, load average: 0.44, 0.22, 0.20
Tasks: 75 total, 1 running, 74 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.9% us, 0.3% sy, 0.0% ni, 97.5% id, 0.2% wa, 0.0% hi, 0.0% si
Mem: 8146120k total, 7736760k used, 409360k free, 92060k buffers
Swap: 8193108k total, 1240572k used, 6952536k free, 2095432k cached
|