need help with my.cnf

leblover

Verified User
Joined
Apr 22, 2004
Messages
26
hello

im using this my.cnf


[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_connections=500
#max_user_connection=30
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=256M
join_buffer=1M
max_allowed_packet=64M
table_cache=1024
record_buffer=1M
sort_buffer_size=12M
read_buffer_size=12M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=8
myisam_sort_buffer_size=64M
log-bin
server-id=1

#[mysql.server]
#user=mysql
#basedir=/mysql

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=64M

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

[isamchk]
key_buffer=94M
sort_buffer=94M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout





my server is

2X Quad-Core Intel Xeon
2.0GHz 8MB cache
Control Panel: Directadmin
Upgrade RAM: Upgrade to 12 GB Ecc
Primary HDD: Upgrade HDD SATA2 320 GB
Secondary HDD : HDD SATA2 160 GBOS:
linux CentOS 64 Bit




but my server having loud and i have just one site on it

so is there any thing wrong in this file ?


pls :o
 
thx for answeing


so far i make this ghange



[root@host /]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
query_cache_limit=10M
query_cache_size=32M
query_cache_type=1
max_connections=500
#max_user_connection=30
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=1024M
join_buffer=4M
max_allowed_packet=64M
table_cache=2048
record_buffer=1M
sort_buffer_size=12M
read_buffer_size=8M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=8
myisam_sort_buffer_size=64M
log-bin
server-id=1

#[mysql.server]
#user=mysql
#basedir=/mysql

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=64M

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

[isamchk]
key_buffer=94M
sort_buffer=94M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout

but its giveing me what i will post in my next post here

i dont get it :$
 
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.0.51a-community-log x86_64

Uptime = 0 days 0 hrs 0 min 38 sec
Avg. qps = 78
Total Questions = 2993
Threads Connected = 3

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 0 out of 3017 that take longer than 10 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is enabled
The expire_logs_days is not set.
The mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manually
Setting expire_logs_days will allow you to remove old binary logs automatically
See http://dev.mysql.com/doc/refman/5.0/en/purge-master-logs.html
Binlog sync is not enabled, you could loose binlog records during a server crash

WORKER THREADS
Current thread_cache_size = 128
Current threads_cached = 0
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = max_connections
Current threads_connected = threads_connected
Historic max_used_connections = max_used_connections
The number of used connections is 1% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating

No InnoDB Support Enabled!

MEMORY USAGE
Max Memory Ever Allocated : 1.23 G
Configured Max Per-thread Buffers : 11.97 G
Configured Max Global Buffers : 1.04 G
Configured Max Memory Limit : 13.01 G
Physical Memory : 11.73 G

nMax memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 430 M
Current key_buffer_size = 1.00 G
Key cache miss rate is 1 : 293
Key buffer free ratio = 81 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 32 M
Current query_cache_used = 8 M
Current query_cache_limit = 10 M
Current Query cache Memory fill ratio = 26.08 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 12 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 4.00 M
You have had 38 queries where a join could not use an index properly
join_buffer_size >= 4 M
This is not advised
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.

OPEN FILES LIMIT
Current open_files_limit = 4606 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_cache value = 2048 tables
You have a total of 814 tables
You have 823 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 275 temp tables, 5% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 7 M
Current table scan ratio = 2041 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 207
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
 
You must let MySQL run at least 48 hours before using any automatic performance tuner otherwise the results won't help you, quite the inverse.

Also, I suggest you run those scripts when the server is on its maximum load for better results.
 
Back
Top