new new said:where exactly do you put this my.cnf in direct admin?
do i use it to upload it via ftp,or do i have to put it somewhere else?
please help
eymbo said:The file is located at /etc/my.cnf
$ free
total used free shared buffers cached
Mem: 1033216 656008 377208 0 1888 58356
-/+ buffers/cache: 595764 437452
Swap: 2096472 55468 2041004
Free: total used free shared buffers cached
Mem: 1033192 1015976 17216 0 924 17996
-/+ buffers/cache: 997056 36136
Swap: 2096472 1437116 659356
# uptime
Yes, Jeff. Indeed the server becomes unusable, that is what happens.It appears you have two gigabytes of swap memory and over one gigabyte of swap memory in use.
I've always maintained that you should never have that much swap memory in place because your server will become unusable long before you use it.
17:30:13 up 23:31, 1 user, load average: 0.28, 0.24, 0.19
total used free shared buffers cached
Mem: 1033192 1017400 15792 0 17440 516080
-/+ buffers/cache: 483880 549312
Swap: 2096472 144 2096328
Jeff is there any way of determining actual memeory free, or actual memory used rather then the figure of what is ready for deployment.Used memory is almost always equal to free memory because when Linux manages memory it's listed as used even though it's only use is to be available for immediate deployment.
There is not my.cnf under /etc/. When I created one using the recommendations in this thread, mysql would not start.
I notice that the recommendations for the my.cnf settings are very old. Are they still valid? If so, why did my mysql fail to start?
I don't know any way of finding out more about memory usage.
free
total used free shared buffers cached
Mem: 2073516 1519256 554260 0 61064 1067596
-/+ buffers/cache: 390596 1682920
Swap: 2096472 0 2096472
Allow me to share /etc/my.cnf file we use on our clients' MySQL servers:I suggest implementing them to alieviate the load MySQL may cause when you run big SQL sites on your server:
[mysqld]
connect_timeout=15
datadir=/var/lib/mysql
interactive_timeout=50
join_buffer=1M
key_buffer=384M
max_allowed_packet=1M
max_connect_errors=10
max_connections=350
max_user_connections=25
myisam_sort_buffer_size=64M
old-passwords = 1
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
read_buffer_size=2M
record_buffer=1M
server-id=1
skip-innodb
skip-locking
socket=/var/lib/mysql/mysql.sock
sort_buffer_size=2M
table_cache=512
thread_cache_size=8
thread_concurrency=2
wait_timeout=50
[mysql.server]
basedir=/var/lib
user=mysql
[safe_mysqld]
open_files_limit=8192
pid-file=/var/lib/mysql/mysql.pid
[mysqldump]
quick
max_allowed_packet=16M
[mysql]
no-auto-rehash
[isamchk]
key_buffer=64M
read_buffer=16M
sort_buffer=64M
write_buffer=16M
[myisamchk]
key_buffer=64M
read_buffer=16M
sort_buffer=64M
write_buffer=16M
[mysqlhotcopy]
interactive-timeout
Thanks ServerTune .Allow me to share /etc/my.cnf file we use on our clients' MySQL servers:
You need to change the directive:
thread_concurrency=2
to match the number of CPUs on your server. This directive is for a server with 2 CPUs.
Yes, the directive should be set to 2X the number of processors in your machine for best performance. Thank you!Thanks ServerTune .
Shouldn't the thread_concurrency be twice the number of your processors then?
That was the previous advice. I have 1 processor and thread_concurrency=2 seems to work fine.