Gnoll
05.11.2009, 20.53
se vuoi aumentare di velocità il tutto ti consiglio di installare lighttpd al posto di apache, è molto piu performante.
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
#skip-innodb
skip-bdb
max_connections = 2000
query_cache_min_res_unit = 16K
key_buffer = 64M
max_allowed_packet = 16M
thread_stack = 256K
thread_cache_size = 512
table_cache = 1024
thread_concurrency = 8
query_cache_type = 1
query_cache_size = 64M
query_cache_limit = 80M
tmp_table_size = 128M
max_heap_table_size = 32M
innodb_buffer_pool_size = 128M
join_buffer_size = 1M
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6851 mysql 20 0 195m 42m 4608 S 205.7 0.5 5:46.24 mysqld
[root@fserv03 ~]# cat /etc/redhat-release CentOS release 5.4 (Final) [root@fserv03 ~]# yum info mysql.i386 | grep Version Version : 5.0.77
mysql Ver 14.12 Distrib 5.0.86, for redhat-linux-gnu (i686) using readline 5.1
Running the server with the binary log enabled makes performance about 1% slower. However, the benefits of the binary log for restore operations and in allowing you to set up replication generally outweigh this minor performance decrement.
CREATE TABLE `pers_stats` (
`id` bigint(20) NOT NULL,
`usi` int(9) NOT NULL,
`thumb` varchar(255) character set latin1 NOT NULL,
`nome` varchar(255) character set latin1 NOT NULL,
`picture` text character set latin1 NOT NULL,
`frasi` text character set latin1 NOT NULL,
`approvato` tinyint(1) NOT NULL,
`autore` bigint(20) NOT NULL,
`tipo` int(2) NOT NULL,
`data_cr` date NOT NULL,
`voti` int(6) NOT NULL default '0',
`nome_autore` text character set latin1 NOT NULL,
`u_voti` text character set latin1 NOT NULL,
`n_voti` int(10) NOT NULL,
`modificabile` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
#skip-innodb
skip-bdb
max_connections = 10000
query_cache_min_res_unit = 8K
key_buffer = 256M
max_allowed_packet = 16M
thread_stack = 256K
thread_cache_size = 512
table_cache = 1024
thread_concurrency = 8
query_cache_type = 1
query_cache_limit = 16M
query_cache_size = 64M
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
top - 15:33:11 up 3:11, 1 user, load average: 333.31, 618.42, 836.42 Tasks: 2063 total, 1887 running, 176 sleeping, 0 stopped, 0 zombie Cpu(s): 97.5%us, 2.4%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st Mem: 8251544k total, 6508948k used, 1742596k free, 99836k buffers Swap: 1051376k total, 0k used, 1051376k free, 1865924k cached