Sức mạnh và tính linh hoạt của nguồn mở Linux và Open có nghĩa là có một số lượng đáng kinh ngạc của 40 sửa đổi / etc / tập tin của bạn để xác định rằng hệ thống có được mật khẩu và thông tin nhóm từ bộ điều khiển miền Windows. | 84 MySQL Server Tuning Here are five steps you can take to optimize your MySQL installation roughly in increasing order of difficulty and effectiveness . 1. Run mysqlcheck -0 database. This will optimize your tables reclaiming lost space by defragging your database. This is especially useful if you have recently changed the structure of your database or have deleted a large amount of data from it. 2. Renice mysqld. If you are running a dedicated MySQL server you can tell the scheduler to run mysql at a much higher priority than other tasks. The mysql manual recommends adding a line like this to your safe_mysqld script renice -20 However I have also found it necessary to find the following hunk of code NOHUP_NICENESS nohup if test -w then NOHUP_NICENESS nohup nice 2 r if test -eq 0 test x NOHUP_NICENESS xo nice 1 echo foo dev null 2 1 then NOHUP_NICENESS nice -- NOHUP_NICENESS nohup else NOHUP_NICENESS nohup fi fi and replace it with simply NOHUP_NICENESS nohup nice -20 Now safe_mysqld and all of the mysqld processes will run at the greatest possible priority. It does this at the expense of all other processes so if you are trying to run other services along with mysql on the same machine you may want to pick a higher number somewhere in the -10 to -5 range is probably a bit more conservative . 3. Create indices. If you have long running queries one very good optimization you can make is to add appropriate indices. If you see a long running query when running mtop as discussed in Monitoring MySQL Health with mtop 81 then consider creating a relevant index mysql create index name on Member Name io Indexing is a trade-off of disk space for performance and in this age of inexpensive storage there s no excuse for neglecting your indices. Having too many indices usually doesn t hurt but doing a linear search or a unique insert on a large table that doesn t have an associated index can make your server crawl. 176 I Information Servers MySQL Server Tuning 84 4. Check your