Mysql My.ini详细说明(三)
务日志,这提供了完整的ACID的行为.
如果你想安全,并且正在执行一些小操作,你可以设置为0或者2在减少磁盘I / O日志。
#innodb_flush_log_at_trx_commit=1
# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
这个大小用于缓冲InnoDB在缓冲日志数据。一旦它满了,InnoDB会在磁盘上释放它。
它无论如何都会一秒缓冲一次,这对于非常大的日志是没有意义的。(即使有长事务)
innodb_log_buffer_size=1M
# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system. Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
InnoDB,不像MyISAM,使用一个缓冲池来缓存的两个索引和行数据。这个磁盘I / O设置的更大,需要访问的数据表更少。在专用的
数据库服务器上你可以设置参数高达80%的机器的物理内存大小。不用把它设置的太大,不过,因为在操作系统中竞争的物理内存可能导致内存不够分。注意,32位系统上的你可能被限制在2 - 3.5g的用户级内存,所以不要设置的太高。
innodb_buffer_pool_size=83M
# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
每个日志文件在日志组里的大小。你应该将日志文件大约为25% - -100%缓冲池大小合并来避免不必要的缓冲池的缓冲行为覆盖日志文件。然而,一个大的日志文件将增加复苏过程的所需时间。
innodb_log_file_size=17M
# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
InnoDB的内核允许多线程。最高性能取决于高的应用程序、硬件以及操作系统。
一个很高的值可能导致线程抖动
innodb_thread_concurrency=8