Post Reply  Post Thread 
Pages (3): « First < Previous 1 [2] 3 Next > Last »
Multi forum server optimization ?
tomek
Junior Member
**

Posts: 15
Group: Registered
Joined: Aug 2006
Status: Offline
Reputation: 0
Post: #11
RE: Multi forum server optimization ?

Thx.

08-16-2006 01:27 PM
Find all posts by this user Quote this message in a reply
tomek
Junior Member
**

Posts: 15
Group: Registered
Joined: Aug 2006
Status: Offline
Reputation: 0
Post: #12
RE: Multi forum server optimization ?

How about now ? I have offen error like that:

Code:
[ERROR] Got error 12 when reading table './plewersanci/posts'
[ERROR] /usr/libexec/mysqld: Got error 12 from storage engine
[ERROR] /usr/libexec/mysqld: Sort aborted


I have got 2 x Pentium II Xeon 450 MHz with 512 MB

top - 21:02:16 up 4 days, 6:01, 1 user, load average: 2.87, 2.33, 2.17
Tasks: 102 total, 6 running, 96 sleeping, 0 stopped, 0 zombie
Cpu(s): 36.2% user, 18.6% system, 0.0% nice, 45.2% idle
Mem: 514356k total, 509408k used, 4948k free, 100212k buffers
Swap: 497972k total, 31336k used, 466636k free, 100440k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31458 root 15 0 1104 1104 844 R 26 0.2 0:00.91 top
31465 mysql 14 0 194m 171m 3648 R 14 34.1 0:00.17 mysqld
30259 nobody 10 0 7612 7580 5756 S 10 1.5 0:04.12 httpd
31469 mysql 14 0 194m 171m 3648 R 8 34.1 0:00.10 mysqld
30258 nobody 9 0 7412 7376 5744 S 7 1.4 0:03.98 httpd
30965 nobody 9 0 7372 7336 5732 S 7 1.4 0:01.67 httpd
30265 nobody 9 0 7532 7500 5692 S 6 1.5 0:04.18 httpd
30951 nobody 9 0 7508 7472 5720 S 4 1.5 0:01.19 httpd
7 root 12 0 0 0 0 D 2 0.0 21:15.96 kupdated
31468 mysql 10 0 194m 171m 3648 D 2 34.1 0:00.03 mysqld
7387 mysql 14 0 194m 171m 3648 R 1 34.1 7:19.73 mysqld
30236 nobody 9 0 7508 7480 5756 S 1 1.5 0:04.93 httpd
30946 nobody 9 0 7356 7320 5744 S 1 1.4 0:02.55 httpd
1 root 8 0 100 92 72 S 0 0.0 0:09.79 init
2 root 8 0 0 0 0 S 0 0.0 0:00.00 keventd
3 root 19 19 0 0 0 S 0 0.0 0:01.68 ksoftirqd_CPU0
4 root 19 19 0 0 0 S 0 0.0 0:00.96 ksoftirqd_CPU1
5 root 9 0 0 0 0 S 0 0.0 4:49.66 kswapd
6 root 9 0 0 0 0 S 0 0.0 0:00.00 bdflush
8 root 9 0 0 0 0 S 0 0.0 0:00.00 scsi_eh_0
9 root 9 0 0 0 0 S 0 0.0 0:00.00 scsi_eh_1
10 root -1 -20 0 0 0 S 0 0.0 0:00.00 mdrecoveryd
11 root 9 0 0 0 0 S 0 0.0 0:21.48 kreiserfsd
151 root 9 0 604 604 524 S 0 0.1 0:06.10 syslogd
154 root 9 0 456 456 404 S 0 0.1 0:00.02 klogd
753 root 8 0 516 516 460 S 0 0.1 0:00.22 inetd
757 root 8 0 960 796 680 S 0 0.2 0:08.13 sshd
769 root 9 0 568 544 484 S 0 0.1 0:02.23 crond
771 daemon 9 0 604 532 516 S 0 0.1 0:00.01 atd
774 root 8 0 2076 1296 1068 S 0 0.3 0:27.64 sendmail
777 smmsp 9 0 1656 976 844 S 0 0.2 0:00.21 sendmail
826 root 8 0 5444 5404 5352 S 0 1.1 2:05.06 httpd
840 root 8 0 4156 1544 708 S 0 0.3 0:28.25 lstatd
846 root 9 0 4244 2328 1456 S 0 0.5 0:11.54 miniserv.pl
848 root 9 0 100 52 52 S 0 0.0 0:00.00 agetty
849 root 9 0 100 52 52 S 0 0.0 0:00.00 agetty
850 root 9 0 112 64 64 S 0 0.0 0:00.00 agetty

httpd.conf and my.cnf is like that.

I will be grateful if you could help me again.

EDIT:

Today I have got:

Code:
061120 19:19:39 [ERROR] /usr/libexec/mysqld: Table 'users' is marked as crashed and should be repaired
061120 19:19:39 [ERROR] /usr/libexec/mysqld: Sort aborted


Help me please!

11-17-2006 08:15 PM

This post was last modified: 11-20-2006 06:23 PM by tomek.

Find all posts by this user Quote this message in a reply
Pacifier
Administrator
*******

Posts: 214
Group: Administrators
Joined: May 2006
Status: Offline
Reputation: 0
Post: #13
RE: Multi forum server optimization ?

Have you tried recording value of "free -m" when you get those errors? It's probably likely you're running out of physical ram..

Try this for less ram usage:

Code:
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/run/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/run/mysql/mysql.sock
skip-locking
key_buffer = 32M
max_allowed_packet = 1M
table_cache = 128
sort_buffer_size = 768K
join_buffer_size = 768K
net_buffer_length = 8K
read_buffer_size = 512K
read_rnd_buffer_size = 768K
myisam_sort_buffer_size = 6M
#log-bin
server-id = 1

[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 = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


Let me know if that helps..

11-20-2006 06:38 PM
Find all posts by this user Quote this message in a reply
tomek
Junior Member
**

Posts: 15
Group: Registered
Joined: Aug 2006
Status: Offline
Reputation: 0
Post: #14
RE: Multi forum server optimization ?

Code:
free -m
             total       used       free     shared    buffers     cached
Mem:           502        492          9          0        148        155
-/+ buffers/cache:        189        313
Swap:          486          0        486


Thx, I will check config for less ram usage Smile

11-20-2006 06:42 PM
Find all posts by this user Quote this message in a reply
tomek
Junior Member
**

Posts: 15
Group: Registered
Joined: Aug 2006
Status: Offline
Reputation: 0
Post: #15
RE: Multi forum server optimization ?

Code:
061120 19:43:43 [ERROR] /usr/libexec/mysqld: Table 'users' is marked as crashed and should be repaired
061120 19:43:43 [ERROR] /usr/libexec/mysqld: Sort aborted


Sad

11-20-2006 06:54 PM
Find all posts by this user Quote this message in a reply
Pacifier
Administrator
*******

Posts: 214
Group: Administrators
Joined: May 2006
Status: Offline
Reputation: 0
Post: #16
RE: Multi forum server optimization ?

That's because you need to repair your tables... Try repairing and optimizing on all databases.

Code:
mysqlcheck -uroot -p -ro --all-databases

11-20-2006 09:31 PM
Find all posts by this user Quote this message in a reply
tomek
Junior Member
**

Posts: 15
Group: Registered
Joined: Aug 2006
Status: Offline
Reputation: 0
Post: #17
RE: Multi forum server optimization ?

It's done Icon_v

Thank You very much.

11-21-2006 08:09 AM
Find all posts by this user Quote this message in a reply
tomek
Junior Member
**

Posts: 15
Group: Registered
Joined: Aug 2006
Status: Offline
Reputation: 0
Post: #18
RE: Multi forum server optimization ?

New server - old problem Confused

I have change server to the new one with 2 GB. From few weeks I 've got problem with "Got error 12 from storage engine (Errno: 1030)"

TOP

Code:
top - 17:26:13 up 1 day, 10:01,  1 user,  load average: 0.55, 0.62, 0.66
Tasks: 131 total,   2 running, 128 sleeping,   0 stopped,   1 zombie
Cpu(s):  7.5%us, 10.1%sy,  0.0%ni, 76.7%id,  5.0%wa,  0.0%hi,  0.0%si,  0.6%st
Mem:   1966260k total,  1954136k used,    12124k free,   105480k buffers
Swap:   524280k total,       52k used,   524228k free,  1241056k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
25426 root      16   0  2288 1196  860 R  5.1  0.1   0:33.97 top
26127 root      18   0  1516  564  484 S  4.4  0.0   0:00.14 getty
26126 root      18   0  1520  568  484 S  3.5  0.0   0:00.11 getty
26090 www-data  15   0 82176 6288 3980 S  1.6  0.3   0:00.06 apache
23803 mysql     15   0 1447m 126m 5124 S  1.3  6.6   1:48.44 mysqld
25359 www-data  15   0 82164 9164 6824 S  0.3  0.5   0:00.39 apache
25378 www-data  15   0 82176 8416 6044 S  0.3  0.4   0:00.11 apache
25768 www-data  17   0 82200 8464 6108 S  0.3  0.4   0:00.19 apache
26077 www-data  15   0 82036 6388 4220 S  0.3  0.3   0:00.06 apache
26099 www-data  15   0 82032 5452 3376 S  0.3  0.3   0:00.03 apache
    1 root      16   0  1552  624  528 S  0.0  0.0   0:05.72 init
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.06 ksoftirqd/0
    4 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.01 events/0
    6 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
    7 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
    8 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 xenwatch
    9 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 xenbus
   16 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kblockd/0
   20 root      13  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
   59 root      15   0     0    0    0 S  0.0  0.0   0:00.02 pdflush
   60 root      15   0     0    0    0 S  0.0  0.0   0:04.19 pdflush
   62 root      13  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
   61 root      15   0     0    0    0 S  0.0  0.0   0:06.23 kswapd0
  578 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  658 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kpsmoused
  663 root      15   0  1524  552  472 S  0.0  0.0   0:02.51 logd
  806 root      11  -4  2096  580  352 S  0.0  0.0   0:00.10 udevd
1646 root      15   0     0    0    0 S  0.0  0.0   0:01.87 kjournald
1802 root      16   0  1524  520  444 S  0.0  0.0   0:00.00 getty
1859 root      16   0  1644  496  408 S  0.0  0.0   0:00.01 dd
1861 klog      15   0  1524  384  312 S  0.0  0.0   0:00.00 klogd
2114 root      15   0  4700 1636 1316 S  0.0  0.1   0:05.03 master
2118 postfix   16   0  6212 3272 1416 S  0.0  0.2   0:12.36 qmgr
2143 root      16   0  4848 1068  728 S  0.0  0.1   0:00.02 sshd
2188 root      16   0  2108  860  680 S  0.0  0.0   0:00.01 cron


my.cnf

Code:
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "/var/lib/mysql/my.cnf" to set server-specific options or
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port        = 3306
socket        = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket        = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/mysql
tmpdir        = /tmp
language    = /usr/share/mysql/english
skip-external-locking
#
# For compatibility to other Debian packages that still use
# libmysqlclient10 and libmysqlclient12.
old_passwords    = 1
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address        = 0.0.0.0
bind-address        = 127.0.0.1
set-variable    = max_connections=512
#
# * Fine Tuning
#
key_buffer        = 256M
max_allowed_packet    = 64M
table_cache        = 256
sort_buffer_size    = 16M
join_buffer_size    = 16M
read_buffer_size    = 512K
thread_stack        = 128K
thread_cache_size    = 8
#
# * Query Cache Configuration
#
query_cache_limit    = 1048576
query_cache_size        = 256M
query_cache_type        = 1
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log        = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
log_slow_queries    = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication.
#server-id        = 1
log_bin            = /var/log/mysql/mysql-bin.log
# WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
expire_logs_days    = 10
max_binlog_size         = 100M
#binlog_do_db        = include_database_name
#binlog_ignore_db    = include_database_name
#
# * BerkeleyDB
#
# According to an MySQL employee the use of BerkeleyDB is now discouraged
# and support for it will probably cease in the next versions.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

[mysqldump]
quick
quote-names
max_allowed_packet    = 16M

[mysql]
#no-auto-rehash    # faster start of mysql but no tab completition

[isamchk]
key_buffer        = 256M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the ndbd storage daemons,
# not from the ndb_mgmd management daemon.
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


I will be grateful if you could help me again Smile

01-14-2007 04:31 PM
Find all posts by this user Quote this message in a reply
Pacifier
Administrator
*******

Posts: 214
Group: Administrators
Joined: May 2006
Status: Offline
Reputation: 0
Post: #19
RE: Multi forum server optimization ?

Try making the following changes in my.cnf file:

Code:
#
# * Fine Tuning
#
key_buffer = 256M
max_allowed_packet = 64M
table_cache = 1500
sort_buffer_size = 2M
join_buffer_size = 2M
read_buffer_size = 2M
thread_cache_size = 50
interactive_timeout = 60
wait_timeout = 60
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size        = 16M
query_cache_type        = 1


Repair and optimize databases again as I specified ago, in my last post.

01-14-2007 07:13 PM
Find all posts by this user Quote this message in a reply
tomek
Junior Member
**

Posts: 15
Group: Registered
Joined: Aug 2006
Status: Offline
Reputation: 0
Post: #20
RE: Multi forum server optimization ?

I will try.

Thanks for help.

01-14-2007 07:32 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: