Status
Not open for further replies.
try this to my.cnf

[mysqld]
datadir =/var/lib/mysql
socket =/var/lib/mysql/mysql.sock
log_slow_queries =/var/log/mysql/mysql-slow.log
user=mysql
old_passwords=1
port = 3306
skip-locking
max_connections = 300
key_buffer = 64M
myisam_sort_buffer_size = 64M
max_allowed_packet = 16M
table_cache = 1024
thread_cache_size = 512
join_buffer_size = 2M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 512K
net_buffer_length = 256K
thread_stack = 256K
tmp_table_size = 32M
query_cache_limit = 2M
query_cache_size = 32M
query_cache_type = 1
thread_cache_size = 256
thread_concurrency = 4
long_query_time = 1
skip-bdb
skip-innodb

[mysqldump]
quick
max_allowed_packet = 32M

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

[mysqld_safe]
open_files_limit = 8192

[isamchk]
key_buffer = 32M
sort_buffer_size = 32M
read_buffer = 32M
write_buffer = 32M

[myisamchk]
key_buffer = 32M
sort_buffer_size = 32M
read_buffer = 32M
write_buffer = 32M

[mysqlhotcopy]
interactive-timeout

[client]
socket=/path/to/mysql.sock

creat msql-slow.log and chmod 666 to place the log
 
Hi!

Well, i never used DLE, but using wordpress is similar, so:
- Install caching module, so there will be fever mysql query.
- Delete every statistic module, from most popular to any kind of statistic. Use google analytics or getclicky, etc.
- Delete ajax search module, if you installed one
- edit your theme, and for example if there are any tags or categories, edit them to static html (for example like: <?php showcategories(); ?> to <html><a href="jj">Downloads</a><br> etc.
- edit php config, and disable php-s persistent/keepalive connection to mysql feature

Thats all that comes to my mind at first.
 
As much optimisation as you want start from: hxxp: builtwith.cxm
and you will see that the big ones are not using apache.
i'm about to change to nginx as well final tweeking stage.
 
As much optimisation as you want start from: hxxp: builtwith.cxm
and you will see that the big ones are not using apache.
i'm about to change to nginx as well final tweeking stage.

Is the sourceccode of DLE compatible with nginx? or there is mods to be done?
cheers
 
I'm testing it at the moment and so far all you need is the htaccess with nginx has in its vhost. below what it should look like

PHP:
server {
    listen      ip:80;
    server_name home;
    

    root /home/....;

    rewrite ^/page/(.*)$ /index.php?cstart=$1 last;

    location / {
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
        rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
        rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
        rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
        rewrite "^/([^.]+)(/?)+$" /index.php?do=cat&category=$1 last;
        rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
        index  index.php index.html index.htm;
    }

    location /tags/ {
        rewrite ^/tags/([^/]*)(/?)+$ /index.php?do=tags&tag=$1 last;
        rewrite ^/tags/([^/]*)/page/([0-9]+)(/?)+$ /index.php?do=tags&tag=$1&cstart=$2 last;
    }

    location /user/ {
        rewrite ^/user/([^/]*)/rss.xml$ /engine/rss.php?subaction=allnews&user=$1 last;
        rewrite ^/user/([^/]*)(/?)+$ /index.php?subaction=userinfo&user=$1 last;
        rewrite ^/user/([^/]*)/page/([0-9]+)(/?)+$ /index.php?subaction=userinfo&user=$1&cstart=$2 last;
        rewrite ^/user/([^/]*)/news(/?)+$ /index.php?subaction=allnews&user=$1 last;
        rewrite ^/user/([^/]*)/news/page/([0-9]+)(/?)+$ /index.php?subaction=allnews&user=$1&cstart=$2 last;
        rewrite ^/user/([^/]*)/news/rss.xml(/?)+$ /engine/rss.php?subaction=allnews&user=$1 last;
    }

    location /lastnews/ {
        rewrite ^/lastnews/(/?)+$ index.php?do=lastnews last;
        rewrite ^/lastnews/page/([0-9]+)(/?)+$ /index.php?do=lastnews&cstart=$1 last;
    }

    location /catalog/ {
        rewrite ^/catalog/([^/]*)/rss.xml$ /engine/rss.php?catalog=$1 last;
        rewrite ^/catalog/([^/]*)(/?)+$ /index.php?catalog=$1 last;
        rewrite ^/catalog/([^/]*)/page/([0-9]+)(/?)+$ /index.php?catalog=$1&cstart=$2 last;
    }

    location /newposts {
        rewrite ^/newposts(/?)+$ /index.php?subaction=newposts last;
        rewrite ^/newposts/page/([0-9]+)(/?)+$ /index.php?subaction=newposts&cstart=$1 last;
    }

    location /favorites {
        rewrite ^/favorites(/?)+$ /index.php?do=favorites last;
        rewrite ^/favorites/page/([0-9]+)(/?)+$ /index.php?do=favorites&cstart=$1 last;
    }

    location ~ \.(html|xml) {
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4 last;
        rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3 last;
        rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2 last;
        rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3 last;
        rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2 last;
        rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2 last;
        rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1 last;
        rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2 last;
        rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1 last;
        rewrite "^/static/(.*).html(/?)+$" /index.php?do=static&page=$1 last;
        rewrite ^/rules.html$ /index.php?do=rules last;
        rewrite ^/statistics.html$ /index.php?do=stats last;
        rewrite ^/addnews.html$ /index.php?do=addnews last;
        rewrite ^/([^.]+)/rss.xml$ /engine/rss.php?do=cat&category=$1 last;
        rewrite ^/page,([0-9]+),([^/]+).html$ /index.php?do=static&page=$2&news_page=$1 last;
        rewrite ^/print:([^/]+).html$ /engine/print.php?do=static&page=$1 last;
        rewrite ^/rss.xml$ /engine/rss.php last;
        rewrite ^/sitemap.xml$ /uploads/sitemap.xml last;
    }

    location ~* \.(jpg|jpeg|gif|png|ico|swf|css|js)$ {
        expires             30d;
        add_header          Cache-Control public;
    }

## There is an additional password to admin
    location =/admin.php {
        auth_basic            "closed section";
        auth_basic_user_file  htpasswd;
        fastcgi_pass   unix:/tmp/fastcgi.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ \.php$ {
        fastcgi_pass   unix:/tmp/fastcgi.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ /\.ht {
        deny  all;
    }
}

you can also port nginx to apache that should speed up things i i have read!
All depends on your resources.
Mine are limited so no apache.
So far so good tring to get mysql optimized now to use less resouces.
 
I'm testing it at the moment and so far all you need is the htaccess with nginx has in its vhost. below what it should look like

PHP:
server {
    listen      ip:80;
    server_name home;
    

    root /home/....;

    rewrite ^/page/(.*)$ /index.php?cstart=$1 last;

    location / {
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
        rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
        rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
        rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
        rewrite "^/([^.]+)(/?)+$" /index.php?do=cat&category=$1 last;
        rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
        index  index.php index.html index.htm;
    }

    location /tags/ {
        rewrite ^/tags/([^/]*)(/?)+$ /index.php?do=tags&tag=$1 last;
        rewrite ^/tags/([^/]*)/page/([0-9]+)(/?)+$ /index.php?do=tags&tag=$1&cstart=$2 last;
    }

    location /user/ {
        rewrite ^/user/([^/]*)/rss.xml$ /engine/rss.php?subaction=allnews&user=$1 last;
        rewrite ^/user/([^/]*)(/?)+$ /index.php?subaction=userinfo&user=$1 last;
        rewrite ^/user/([^/]*)/page/([0-9]+)(/?)+$ /index.php?subaction=userinfo&user=$1&cstart=$2 last;
        rewrite ^/user/([^/]*)/news(/?)+$ /index.php?subaction=allnews&user=$1 last;
        rewrite ^/user/([^/]*)/news/page/([0-9]+)(/?)+$ /index.php?subaction=allnews&user=$1&cstart=$2 last;
        rewrite ^/user/([^/]*)/news/rss.xml(/?)+$ /engine/rss.php?subaction=allnews&user=$1 last;
    }

    location /lastnews/ {
        rewrite ^/lastnews/(/?)+$ index.php?do=lastnews last;
        rewrite ^/lastnews/page/([0-9]+)(/?)+$ /index.php?do=lastnews&cstart=$1 last;
    }

    location /catalog/ {
        rewrite ^/catalog/([^/]*)/rss.xml$ /engine/rss.php?catalog=$1 last;
        rewrite ^/catalog/([^/]*)(/?)+$ /index.php?catalog=$1 last;
        rewrite ^/catalog/([^/]*)/page/([0-9]+)(/?)+$ /index.php?catalog=$1&cstart=$2 last;
    }

    location /newposts {
        rewrite ^/newposts(/?)+$ /index.php?subaction=newposts last;
        rewrite ^/newposts/page/([0-9]+)(/?)+$ /index.php?subaction=newposts&cstart=$1 last;
    }

    location /favorites {
        rewrite ^/favorites(/?)+$ /index.php?do=favorites last;
        rewrite ^/favorites/page/([0-9]+)(/?)+$ /index.php?do=favorites&cstart=$1 last;
    }

    location ~ \.(html|xml) {
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 last;
        rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4 last;
        rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3 last;
        rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2 last;
        rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3 last;
        rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2 last;
        rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2 last;
        rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1 last;
        rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2 last;
        rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1 last;
        rewrite "^/static/(.*).html(/?)+$" /index.php?do=static&page=$1 last;
        rewrite ^/rules.html$ /index.php?do=rules last;
        rewrite ^/statistics.html$ /index.php?do=stats last;
        rewrite ^/addnews.html$ /index.php?do=addnews last;
        rewrite ^/([^.]+)/rss.xml$ /engine/rss.php?do=cat&category=$1 last;
        rewrite ^/page,([0-9]+),([^/]+).html$ /index.php?do=static&page=$2&news_page=$1 last;
        rewrite ^/print:([^/]+).html$ /engine/print.php?do=static&page=$1 last;
        rewrite ^/rss.xml$ /engine/rss.php last;
        rewrite ^/sitemap.xml$ /uploads/sitemap.xml last;
    }

    location ~* \.(jpg|jpeg|gif|png|ico|swf|css|js)$ {
        expires             30d;
        add_header          Cache-Control public;
    }

## There is an additional password to admin
    location =/admin.php {
        auth_basic            "closed section";
        auth_basic_user_file  htpasswd;
        fastcgi_pass   unix:/tmp/fastcgi.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ \.php$ {
        fastcgi_pass   unix:/tmp/fastcgi.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ /\.ht {
        deny  all;
    }
}
you can also port nginx to apache that should speed up things i i have read!
All depends on your resources.
Mine are limited so no apache.
So far so good tring to get mysql optimized now to use less resouces.


Keep us update how you going with it.

cheers mate
 
test is up scriptzmafia.com
working so far
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.1 0.1 2160 644 ? Ss 15:11 0:02 init [3]
root 2 0.0 0.0 0 0 ? S< 15:11 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN 15:11 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S< 15:11 0:00 [events/0]
root 5 0.0 0.0 0 0 ? S< 15:11 0:00 [khelper]
root 6 0.0 0.0 0 0 ? S< 15:11 0:00 [kthread]
root 9 0.0 0.0 0 0 ? S< 15:11 0:00 [kblockd/0]
root 10 0.0 0.0 0 0 ? S< 15:11 0:00 [kacpid]
root 168 0.0 0.0 0 0 ? S< 15:11 0:00 [cqueue/0]
root 171 0.0 0.0 0 0 ? S< 15:11 0:00 [khubd]
root 173 0.0 0.0 0 0 ? S< 15:11 0:00 [kseriod]
root 237 0.0 0.0 0 0 ? S 15:11 0:00 [khungtaskd]
root 238 0.0 0.0 0 0 ? S 15:11 0:00 [pdflush]
root 239 0.0 0.0 0 0 ? S 15:11 0:00 [pdflush]
root 240 0.0 0.0 0 0 ? S< 15:11 0:00 [kswapd0]
root 241 0.0 0.0 0 0 ? S< 15:11 0:00 [aio/0]
root 459 0.0 0.0 0 0 ? S< 15:11 0:00 [kpsmoused]
root 488 0.0 0.0 0 0 ? S< 15:11 0:00 [mpt_poll_0]
root 489 0.0 0.0 0 0 ? S< 15:11 0:00 [mpt/0]
root 490 0.0 0.0 0 0 ? S< 15:11 0:00 [scsi_eh_0]
root 493 0.0 0.0 0 0 ? S< 15:11 0:00 [ata/0]
root 494 0.0 0.0 0 0 ? S< 15:11 0:00 [ata_aux]
root 501 0.0 0.0 0 0 ? S< 15:11 0:00 [kstriped]
root 510 0.0 0.0 0 0 ? S< 15:11 0:00 [kjournald]
root 535 0.0 0.0 0 0 ? S< 15:11 0:00 [kauditd]
root 568 0.0 0.1 2392 716 ? S<s 15:12 0:00 /sbin/udevd -d
root 1886 0.0 0.0 0 0 ? S< 15:12 0:00 [kmpathd/0]
root 1887 0.0 0.0 0 0 ? S< 15:12 0:00 [kmpath_handle]
root 1953 0.0 0.0 0 0 ? S< 15:12 0:00 [kjournald]
root 1955 0.0 0.0 0 0 ? S< 15:12 0:00 [kjournald]
root 2130 0.0 0.0 0 0 ? S< 15:12 0:00 [iscsi_eh]
root 2180 0.0 0.0 0 0 ? S< 15:12 0:00 [ib_addr]
root 2187 0.0 0.0 0 0 ? S< 15:12 0:00 [ib_mcast]
root 2188 0.0 0.0 0 0 ? S< 15:12 0:00 [ib_inform]
root 2189 0.0 0.0 0 0 ? S< 15:12 0:00 [local_sa]
root 2192 0.0 0.0 0 0 ? S< 15:12 0:00 [iw_cm_wq]
root 2196 0.0 0.0 0 0 ? S< 15:12 0:00 [ib_cm/0]
root 2198 0.0 0.0 0 0 ? S< 15:12 0:00 [rdma_cm]
root 2216 0.0 0.0 22456 428 ? Ssl 15:12 0:00 brcm_iscsiuio
root 2221 0.0 0.0 3700 428 ? Ss 15:12 0:00 iscsid
root 2222 0.0 0.8 4156 4152 ? S<Ls 15:12 0:00 iscsid
root 2470 0.0 0.1 1816 580 ? Ss 15:12 0:00 syslogd -m 0
root 2473 0.0 0.0 1764 404 ? Ss 15:12 0:00 klogd -x
dbus 2521 0.0 0.1 2848 856 ? Ss 15:12 0:00 dbus-daemon --s
nsd 2595 0.0 0.1 3796 724 ? Ss 15:12 0:00 /usr/local/sbin
nsd 2600 0.0 0.1 10660 676 ? S 15:12 0:00 /usr/local/sbin
nsd 2601 0.0 0.0 3848 504 ? S 15:12 0:00 /usr/local/sbin
root 2602 0.0 0.4 21204 2468 ? Ss 15:12 0:00 php-fpm: master
nginx 2611 0.0 0.4 21204 2344 ? S 15:12 0:00 php-fpm: pool w
nginx 2612 0.0 0.4 21204 2348 ? S 15:12 0:00 php-fpm: pool w
root 2619 0.0 0.2 7208 1064 ? Ss 15:12 0:00 /usr/sbin/sshd
ntp 2638 0.0 0.8 4508 4504 ? SLs 15:12 0:00 ntpd -u ntp:ntp
root 2675 0.0 0.2 4628 1216 ? S 15:12 0:00 /bin/sh /usr/bi
mysql 2716 0.0 2.2 123224 11420 ? Sl 15:12 0:00 /usr/libexec/my
root 3017 0.0 2.9 19816 15392 ? Ss 15:12 0:00 lfd - sleeping
nobody 3027 0.0 0.1 53988 752 ? Ssl 15:12 0:00 /usr/local/bin/
nobody 3033 0.0 0.1 53988 748 ? Ssl 15:12 0:00 /usr/local/bin/
root 3076 0.0 0.3 9380 1892 ? Ss 15:12 0:00 sendmail: accep
smmsp 3084 0.0 0.2 8288 1496 ? Ss 15:12 0:00 sendmail: Queue
root 3102 0.0 0.1 7220 1024 ? Ss 15:12 0:00 nginx: master p
nginx 3103 0.0 1.7 15828 8940 ? S 15:12 0:00 nginx: worker p
root 3116 0.0 0.2 5384 1104 ? Ss 15:12 0:00 crond
xfs 3139 0.0 0.2 3400 1064 ? Ss 15:12 0:00 xfs -droppriv -
root 3179 0.0 0.0 3612 428 ? S 15:12 0:00 /usr/sbin/smart
root 3182 0.0 0.0 1748 444 tty1 Ss+ 15:12 0:00 /sbin/mingetty
root 3183 0.0 0.0 1748 448 tty2 Ss+ 15:12 0:00 /sbin/mingetty
root 3194 0.0 1.9 25668 10232 ? SN 15:12 0:00 /usr/bin/python
root 3196 0.0 0.2 2656 1068 ? SN 15:12 0:00 /usr/libexec/ga
root 3210 0.0 0.5 10060 2980 ? Ss 15:15 0:00 sshd: root@pts/
root 3213 0.0 0.2 4632 1428 pts/0 Ss 15:15 0:00 -bash
root 3439 0.0 0.1 4352 936 pts/0 R+ 15:50 0:00 ps aux

total used free shared buffers cached
Mem: 502 414 88 0 64 283
-/+ buffers/cache: 66 436
Swap: 1019 0 1019

maybe someone can tell me how to get it up on less mem
specially my.cmf
heres how it looks now
[mysqld]
datadir =/var/lib/mysql
socket =/var/lib/mysql/mysql.sock
log_slow_queries =/var/log/mysql/mysql-slow.log
user=mysql
#old_passwords=1
#port = 3306
skip-locking
max_connections = 300
key_buffer = 64M
myisam_sort_buffer_size = 64M
max_allowed_packet = 16M
table_cache = 1024
thread_cache_size = 512
join_buffer_size = 2M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 512K
net_buffer_length = 256K
thread_stack = 256K
tmp_table_size = 32M
query_cache_limit = 2M
query_cache_size = 32M
query_cache_type = 1
thread_cache_size = 256
thread_concurrency = 4
long_query_time = 1
skip-bdb
skip-innodb

[mysqldump]
quick
max_allowed_packet = 32M

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

[mysqld_safe]
open_files_limit = 8192

[isamchk]
key_buffer = 32M
sort_buffer_size = 32M
read_buffer = 32M
write_buffer = 32M

[myisamchk]
key_buffer = 32M
sort_buffer_size = 32M
read_buffer = 32M
write_buffer = 32M

[mysqlhotcopy]
interactive-timeout

[client]
socket=/var/lib/mysql/mysql.sock
 
looks good.. but actually am thinking the problem is not apache.
Its mysql thats using a lot of cpu resources..
Is it apache thats making mysql using a lot of resources?
 
test is up scriptzmafia.com
working so far
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.1 0.1 2160 644 ? Ss 15:11 0:02 init [3]
root 2 0.0 0.0 0 0 ? S< 15:11 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN 15:11 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S< 15:11 0:00 [events/0]
root 5 0.0 0.0 0 0 ? S< 15:11 0:00 [khelper]
root 6 0.0 0.0 0 0 ? S< 15:11 0:00 [kthread]
root 9 0.0 0.0 0 0 ? S< 15:11 0:00 [kblockd/0]
root 10 0.0 0.0 0 0 ? S< 15:11 0:00 [kacpid]
root 168 0.0 0.0 0 0 ? S< 15:11 0:00 [cqueue/0]
root 171 0.0 0.0 0 0 ? S< 15:11 0:00 [khubd]
root 173 0.0 0.0 0 0 ? S< 15:11 0:00 [kseriod]
root 237 0.0 0.0 0 0 ? S 15:11 0:00 [khungtaskd]
root 238 0.0 0.0 0 0 ? S 15:11 0:00 [pdflush]
root 239 0.0 0.0 0 0 ? S 15:11 0:00 [pdflush]
root 240 0.0 0.0 0 0 ? S< 15:11 0:00 [kswapd0]
root 241 0.0 0.0 0 0 ? S< 15:11 0:00 [aio/0]
root 459 0.0 0.0 0 0 ? S< 15:11 0:00 [kpsmoused]
root 488 0.0 0.0 0 0 ? S< 15:11 0:00 [mpt_poll_0]
root 489 0.0 0.0 0 0 ? S< 15:11 0:00 [mpt/0]
root 490 0.0 0.0 0 0 ? S< 15:11 0:00 [scsi_eh_0]
root 493 0.0 0.0 0 0 ? S< 15:11 0:00 [ata/0]
root 494 0.0 0.0 0 0 ? S< 15:11 0:00 [ata_aux]
root 501 0.0 0.0 0 0 ? S< 15:11 0:00 [kstriped]
root 510 0.0 0.0 0 0 ? S< 15:11 0:00 [kjournald]
root 535 0.0 0.0 0 0 ? S< 15:11 0:00 [kauditd]
root 568 0.0 0.1 2392 716 ? S<s 15:12 0:00 /sbin/udevd -d
root 1886 0.0 0.0 0 0 ? S< 15:12 0:00 [kmpathd/0]
root 1887 0.0 0.0 0 0 ? S< 15:12 0:00 [kmpath_handle]
root 1953 0.0 0.0 0 0 ? S< 15:12 0:00 [kjournald]
root 1955 0.0 0.0 0 0 ? S< 15:12 0:00 [kjournald]
root 2130 0.0 0.0 0 0 ? S< 15:12 0:00 [iscsi_eh]
root 2180 0.0 0.0 0 0 ? S< 15:12 0:00 [ib_addr]
root 2187 0.0 0.0 0 0 ? S< 15:12 0:00 [ib_mcast]
root 2188 0.0 0.0 0 0 ? S< 15:12 0:00 [ib_inform]
root 2189 0.0 0.0 0 0 ? S< 15:12 0:00 [local_sa]
root 2192 0.0 0.0 0 0 ? S< 15:12 0:00 [iw_cm_wq]
root 2196 0.0 0.0 0 0 ? S< 15:12 0:00 [ib_cm/0]
root 2198 0.0 0.0 0 0 ? S< 15:12 0:00 [rdma_cm]
root 2216 0.0 0.0 22456 428 ? Ssl 15:12 0:00 brcm_iscsiuio
root 2221 0.0 0.0 3700 428 ? Ss 15:12 0:00 iscsid
root 2222 0.0 0.8 4156 4152 ? S<Ls 15:12 0:00 iscsid
root 2470 0.0 0.1 1816 580 ? Ss 15:12 0:00 syslogd -m 0
root 2473 0.0 0.0 1764 404 ? Ss 15:12 0:00 klogd -x
dbus 2521 0.0 0.1 2848 856 ? Ss 15:12 0:00 dbus-daemon --s
nsd 2595 0.0 0.1 3796 724 ? Ss 15:12 0:00 /usr/local/sbin
nsd 2600 0.0 0.1 10660 676 ? S 15:12 0:00 /usr/local/sbin
nsd 2601 0.0 0.0 3848 504 ? S 15:12 0:00 /usr/local/sbin
root 2602 0.0 0.4 21204 2468 ? Ss 15:12 0:00 php-fpm: master
nginx 2611 0.0 0.4 21204 2344 ? S 15:12 0:00 php-fpm: pool w
nginx 2612 0.0 0.4 21204 2348 ? S 15:12 0:00 php-fpm: pool w
root 2619 0.0 0.2 7208 1064 ? Ss 15:12 0:00 /usr/sbin/sshd
ntp 2638 0.0 0.8 4508 4504 ? SLs 15:12 0:00 ntpd -u ntp:ntp
root 2675 0.0 0.2 4628 1216 ? S 15:12 0:00 /bin/sh /usr/bi
mysql 2716 0.0 2.2 123224 11420 ? Sl 15:12 0:00 /usr/libexec/my
root 3017 0.0 2.9 19816 15392 ? Ss 15:12 0:00 lfd - sleeping
nobody 3027 0.0 0.1 53988 752 ? Ssl 15:12 0:00 /usr/local/bin/
nobody 3033 0.0 0.1 53988 748 ? Ssl 15:12 0:00 /usr/local/bin/
root 3076 0.0 0.3 9380 1892 ? Ss 15:12 0:00 sendmail: accep
smmsp 3084 0.0 0.2 8288 1496 ? Ss 15:12 0:00 sendmail: Queue
root 3102 0.0 0.1 7220 1024 ? Ss 15:12 0:00 nginx: master p
nginx 3103 0.0 1.7 15828 8940 ? S 15:12 0:00 nginx: worker p
root 3116 0.0 0.2 5384 1104 ? Ss 15:12 0:00 crond
xfs 3139 0.0 0.2 3400 1064 ? Ss 15:12 0:00 xfs -droppriv -
root 3179 0.0 0.0 3612 428 ? S 15:12 0:00 /usr/sbin/smart
root 3182 0.0 0.0 1748 444 tty1 Ss+ 15:12 0:00 /sbin/mingetty
root 3183 0.0 0.0 1748 448 tty2 Ss+ 15:12 0:00 /sbin/mingetty
root 3194 0.0 1.9 25668 10232 ? SN 15:12 0:00 /usr/bin/python
root 3196 0.0 0.2 2656 1068 ? SN 15:12 0:00 /usr/libexec/ga
root 3210 0.0 0.5 10060 2980 ? Ss 15:15 0:00 sshd: root@pts/
root 3213 0.0 0.2 4632 1428 pts/0 Ss 15:15 0:00 -bash
root 3439 0.0 0.1 4352 936 pts/0 R+ 15:50 0:00 ps aux

total used free shared buffers cached
Mem: 502 414 88 0 64 283
-/+ buffers/cache: 66 436
Swap: 1019 0 1019

maybe someone can tell me how to get it up on less mem
specially my.cmf
heres how it looks now
[mysqld]
datadir =/var/lib/mysql
socket =/var/lib/mysql/mysql.sock
log_slow_queries =/var/log/mysql/mysql-slow.log
user=mysql
#old_passwords=1
#port = 3306
skip-locking
max_connections = 300
key_buffer = 64M
myisam_sort_buffer_size = 64M
max_allowed_packet = 16M
table_cache = 1024
thread_cache_size = 512
join_buffer_size = 2M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 512K
net_buffer_length = 256K
thread_stack = 256K
tmp_table_size = 32M
query_cache_limit = 2M
query_cache_size = 32M
query_cache_type = 1
thread_cache_size = 256
thread_concurrency = 4
long_query_time = 1
skip-bdb
skip-innodb

[mysqldump]
quick
max_allowed_packet = 32M

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

[mysqld_safe]
open_files_limit = 8192

[isamchk]
key_buffer = 32M
sort_buffer_size = 32M
read_buffer = 32M
write_buffer = 32M

[myisamchk]
key_buffer = 32M
sort_buffer_size = 32M
read_buffer = 32M
write_buffer = 32M

[mysqlhotcopy]
interactive-timeout

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

What OS you running on mate?
 
downfreak, Obviously you'll notice a high cpu load as long as you allow the crazy Vietnamese uploaders to post at your site. 99k posts within a month? that's really incredible. :facepalm:

tbh if I were you, I'd stop those 'spammers' and clean up my site.

you won't face any troubles if you control everything on your site.
 
Status
Not open for further replies.
Back
Top