Solved: 10 Years, 8 Months, 2 Weeks ago RAM resource (urgent)
#1
Solved: 10 Years, 8 Months, 2 Weeks ago
Hello there, i have a big problem for my board

i have VPS with 160MB RAM and my board data is around 34MB. And before i move to VPS, my shared host is always had problem with my account, make resource busy they said, and my account was suspended. Than i sugest move to a VPS so i can check it by my own. And than, still resource busy and my VPS hang, over and over again. So i look up to the shell, and i found this :

total       used       free     shared    buffers     cached
Mem:        164036     161420       2616          0        248      18192

Than i stop my http service and make my VPS normal again, use only about 20MB, free 140MB.

but after a minute i turn on http again, this what happen :

             total       used       free     shared    buffers     cached
Mem:        164036     154312       9724          0       2292      42644
-/+ buffers/cache:     109376      54660
Swap:       196600       2432     194168

I don't know how to resolve this, can anyone help me? Thank's before Smile
#2
Solved: 10 Years, 8 Months, 2 Weeks ago
Are you running any mods? what's your boards stats? Is MyBB the only thing you have on the VPS?

We'll need a little bit more information.
#3
Solved: 10 Years, 8 Months, 2 Weeks ago
I have WordPress, but now i make my board closed. seems apache is eating any RAM resource, i don't know what to do.
I use this on my my.conf, it seams more lighty now. I don't this is the problem or just not at the busy time :
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

# For low memory, Berkeley DB should not be used so keep skip-bdb uncommented unless required
skip-bdb

# For low memory, InnoDB should not be used so keep skip-innodb uncommented unless required
skip-innodb

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50


[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout
#4
Solved: 10 Years, 8 Months, 2 Weeks ago
This user has been denied support. This user has been denied support.
The system, webserver, database, etc. all need RAM just for being there, even before you're processing any requests. Then say every request needs 10MB of memory, you're out of memory if you have 10 requests running in parallel at any point in time. The system will start swapping then, thereby making it slower, thereby making it more likely to have requests running in parallel, etc.

So I'm not sure how much free ram you expect to be seeing there. 160MB just isn't much. If you have enough activity on your board to be suspended from a shared host, chances are that such a small VPS just won't suffice.
#5
Solved: 10 Years, 8 Months, 2 Weeks ago
Set your max_connection in MySQL to something like 20. I believe default is 100 and you may save some ram lowering that overheard. MySQL will make room for each connect.

As for apache you can do the same thing. Mess with conf files and lower connections and ram usage.

Quote:i have VPS with 160MB RAM and my board data is around 34MB

And you'd be better off with a $10 a month shared hosting plan at Dreamhost or another reliable provider. I've run 100mb MyBB DB's no problem there.
#6
Solved: 10 Years, 8 Months, 2 Weeks ago

(2011-02-03, 05:28 PM)frostschutz Wrote: The system, webserver, database, etc. all need RAM just for being there, even before you're processing any requests. Then say every request needs 10MB of memory, you're out of memory if you have 10 requests running in parallel at any point in time. The system will start swapping then, thereby making it slower, thereby making it more likely to have requests running in parallel, etc.

So I'm not sure how much free ram you expect to be seeing there. 160MB just isn't much. If you have enough activity on your board to be suspended from a shared host, chances are that such a small VPS just won't suffice.

how much free RAM its does't matter, as long as the server not hang and still up (and not to slow). ill try to add more RAM tomorrow.


(2011-02-03, 05:30 PM)labrocca Wrote: Set your max_connection in MySQL to something like 20. I believe default is 100 and you may save some ram lowering that overheard. MySQL will make room for each connect.

As for apache you can do the same thing. Mess with conf files and lower connections and ram usage.

Quote:i have VPS with 160MB RAM and my board data is around 34MB

And you'd be better off with a $10 a month shared hosting plan at Dreamhost or another reliable provider. I've run 100mb MyBB DB's no problem there.

i'll try with the config. and the hosting is only for IIX server, because all my user from my country, but thank's for the info.

i will tell the result by tomorrow, now is not busy traffic in here. Thank's guys Smile
#7
Solved: 10 Years, 8 Months, 2 Weeks ago
Ok, yerterday i make script for check free ram every 5 minutes, and so far my VPS still up, it's been 30 hours (record in recent weeks). without add extra RAM or anything, just the config apache and mysql.

iam still watching it but right now it solved. thank's guys. Smile
#8
Solved: 10 Years, 8 Months, 2 Weeks ago
your apache config needs to be optimized most likely. max spare servers, max children, keep alive, etc can all be tweaked to reuse resources and limit overhead.
Lost interest, sold my sites, will browse here once in a while. It's been fun.


Forum Jump:


Users browsing this thread: 1 Guest(s)