Status
Not open for further replies.

downfreak

Active Member
94
2010
0
0
Hi,
i am running a DLE portal.
It have around 700K posts on it and its taking a lot of resources.

I cannot even run it on a server with 12Gb Ram + quadcore processor.

Is there a way to reduce these loads?

When i do command "top" on ssh, it shows that mysql is using 300%+ of resources?

Anyone know any fix for it?
thx
 
33 comments
Well, open SSH use

/usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl

this command to get suggestions what to optimizate otherwise you will have problems...

this is not a thing that can be righ away you need to test it every 1-3 days and see what this script suggest to you.
 
when i run mysqltuner.pl this is what i get :

-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Enable the slow query log to troubleshoot bad queries
Set thread_cache_size to 4 as a starting value
Increase table_cache gradually to avoid file descriptor limits
Optimize queries and/or use InnoDB to reduce lock wait
Variables to adjust:
query_cache_size (>= 8M)
sort_buffer_size (> 63K)
read_rnd_buffer_size (> 252K)
thread_cache_size (start at 4)
table_cache (> 4)


so what i need to do now in my.cnf?
 
Well, open SSH use



this command to get suggestions what to optimizate otherwise you will have problems...

this is not a thing that can be righ away you need to test it every 1-3 days and see what this script suggest to you.

this is my new my.conf now :

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
skip-bdb
skip-innodb
query_cache_size=16M
read_rnd_buffer_size=512K
thread_cache_size=64

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 128K

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

I run the mysqltuner again and i get this :
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
Your applications are not closing MySQL connections properly
Variables to adjust:
key_buffer_size (> 1.0G)
query_cache_limit (> 1M, or use smaller result sets)

any idea what else i need to adjust?
thx
 
unninstall/check all your modules,i really think is because of this

Your applications are not closing MySQL connections properly
 
I had the similar problem with rapidscene.ws

It was running on 1GB RAM VPS and the memory usage was just 300MB but the CPU Load was 2-3.

Then I tried tweaking my.cnf and installed eAccelrator, Memchace, etc. but it didn't help much. I asked XSLTel to see if he can do it and KABOOM ! He optimized the server within 12 minutes (exact).

I asked him what he did, and the reply was that he changed the PHP Apache Handler and installed PHP-CGI Handler and since then the load hasn't gone over 0.5 and my VPS hasn't been down (its been 2 month without 0 downtime)
 
Disable related posts mod. And if you take a look in the database specially dle_post table you will see that there are some search_index, this shit increase your database size in thousands of mb and eat lot of resources. Once I highly optimized DLE to decrease CPU usage, but it was long time ago I don't remember well, but ill try and post back here ;)
 
Disable related posts mod. And if you take a look in the database specially dle_post table you will see that there are some search_index, this shit increase your database size in thousands of mb and eat lot of resources. Once I highly optimized DLE to decrease CPU usage, but it was long time ago I don't remember well, but ill try and post back here ;)

That will be of great help to us mate,
cheers
 
I had the similar problem with rapidscene.ws

It was running on 1GB RAM VPS and the memory usage was just 300MB but the CPU Load was 2-3.

Then I tried tweaking my.cnf and installed eAccelrator, Memchace, etc. but it didn't help much. I asked XSLTel to see if he can do it and KABOOM ! He optimized the server within 12 minutes (exact).

I asked him what he did, and the reply was that he changed the PHP Apache Handler and installed PHP-CGI Handler and since then the load hasn't gone over 0.5 and my VPS hasn't been down (its been 2 month without 0 downtime)

hey mate
who is XSLTel?
thx
 
Last edited:
Disable :

- online module counter (dle modile with avatars , if u have)
- use gzip compression
- turn off related post module
- turn off archive
- turn off TOP 10 articles
 
Disable :

- online module counter (dle modile with avatars , if u have)
- use gzip compression
- turn off related post module
- turn off archive
- turn off TOP 10 articles
I already tried that.

But 1 thing is that if i use gzip compression then server load increases more because i heard it takes more cpu! However reduces page load time.
But when server load will be high then the response will be slow like hell :'(
 
Status
Not open for further replies.
Back
Top