[freebsd] Re: [freebsd] Re: [freebsd] Re: [freebsd] FreeBSD 10.0-STABLE (конец апреля 2014) не может смонтировать zfs
23 июня 2014 г., 11:04 пользователь Denis Zaika za...@stels.net написал: 22.06.2014 19:25, Vladislav V. Prodan пишет: 20 июня 2014 г., 20:21 пользователь Denis Zaika za...@stels.net написал: zpool import -F -f -o readonly=on -R /tmp/zroot zroot Запустился в режиме чтения. Хорошо, zpool status -v, и то что без ошибок можно сливать. В общем, слил данные через последние снапшоты и пару разделов пришлось ручками создавать и потом переливать через cp -a. Скрипт для запуска sshd на CD-rom Live-CD (FreeBSD 9.3-BETA2) #!/bin/sh set -x cp -a /etc /tmp mdmfs -s 5m -o rw /dev/md3 /etc cp -a /tmp/etc/ /etc rm -rf /tmp/etc/ dhclient re0 rm -f /etc/resolv.conf echo nameserver 8.8.8.8 /etc/resolv.conf echo PermitRootLogin yes /etc/ssh/sshd_config service sshd onestart passwd # смена пароля, иначе под пустым все равно не зайти -- Vladislav V. Prodan System Network Administrator support.od.ua
[freebsd] Re: [freebsd] Re: [freebsd] Re: [freebsd] Re: [freebsd] FreeBSD 10.0-STABLE (конец апреля 2014) не может смонтировать zfs
#!/bin/sh set -x cp -a /etc /tmp mdmfs -s 5m -o rw /dev/md3 /etc cp -a /tmp/etc/ /etc rm -rf /tmp/etc/ dhclient re0 rm -f /etc/resolv.conf echo nameserver 8.8.8.8 /etc/resolv.conf echo PermitRootLogin yes /etc/ssh/sshd_config service sshd onestart passwd # смена пароля, иначе под пустым все равно не зайти А зачем эти все танцы? вы ж все равно на консоли сидите, scp -r и на машину в сетке.
[freebsd] Re: [freebsd] Re: [freebsd] Re: [freebsd] Re: [freebsd] FreeBSD 10.0-STABLE (конец апреля 2014) не может смонтировать zfs
2014-06-25 15:19 GMT+03:00 Vasiliy P. Melnik ba...@vpm.net.ua: #!/bin/sh set -x cp -a /etc /tmp mdmfs -s 5m -o rw /dev/md3 /etc cp -a /tmp/etc/ /etc rm -rf /tmp/etc/ dhclient re0 rm -f /etc/resolv.conf echo nameserver 8.8.8.8 /etc/resolv.conf echo PermitRootLogin yes /etc/ssh/sshd_config service sshd onestart passwd # смена пароля, иначе под пустым все равно не зайти А зачем эти все танцы? вы ж все равно на консоли сидите, scp -r и на машину в сетке. C трудом понял критику. В консоли сидеть неудобно, ибо для восстановления данных использовалось с 10-к скриптов, некоторые пришлось исправлять на ходу. Работу удаленно по sshd считаю более продуктивной. -- Vladislav V. Prodan System Network Administrator support.od.ua
[freebsd] [mysql][zfs] Странное поведение Mysql - запросы не кешируются
MySQLTuner 1.2.0 - Major Hayden ma...@mhtx.net Bug reports, feature requests, and downloads at http://mysqltuner.com/ Run with '--help' for additional options and output filtering General Statistics -- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.6.17-log [OK] Operating on 64-bit architecture Storage Engine Statistics --- [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 4M (Tables: 56) [--] Data in InnoDB tables: 2M (Tables: 15) [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 52) [!!] Total fragmented tables: 16 Performance Metrics - [--] Up for: 17h 0m 33s (40M q [666.503 qps], 6K conn, TX: 27B, RX: 13B) [--] Reads / Writes: 98% / 2% [--] Total buffers: 364.0M global + 1.8M per thread (50 max threads) [OK] Maximum possible memory usage: 451.5M (5% of installed RAM) [!!] Slow queries: 74% (30M/40M) [OK] Highest usage of available connections: 62% (31/50) [OK] Key buffer size / total MyISAM indexes: 14.0M/3.7M [OK] Key buffer hit rate: 100.0% (773M cached / 12K reads) [!!] Query cache efficiency: 0.0% (0 cached / 40M selects) [OK] Query cache prunes per day: 0 [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 15M sorts) [!!] Joins performed without indexes: 9702 [OK] Temporary tables created on disk: 0% (893 on disk / 15M total) [OK] Thread cache hit rate: 99% (34 created / 6K connections) [!!] Table cache hit rate: 5% (183 open / 3K opened) [OK] Open file limit used: 0% (193/234K) [OK] Table locks acquired immediately: 99% (103M immediate / 103M locks) [OK] InnoDB data size / buffer pool: 2.0M/310.0M Recommendations - General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 hours - recommendations may be inaccurate Adjust your join queries to always utilize indexes Increase table_cache gradually to avoid file descriptor limits Variables to adjust: query_cache_limit ( 8M, or use smaller result sets) join_buffer_size ( 256.0K, or always use indexes with joins) table_cache ( 2000) my.cnf [client] user= root port= 3306 socket = /tmp/mysql.sock [mysqld] port= 3306 bind-address= 127.0.0.1 socket = /tmp/mysql.sock skip-external-locking key_buffer = 14M max_connections = 50 thread_concurrency = 4 tmp_table_size = 24M max_allowed_packet = 1M max_tmp_tables = 128 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M myisam-recover=backup,force query_cache_size = 8M query_cache_limit = 8M thread_cache_size = 64 default-storage-engine = InnoDB log-bin=mysql-bin server-id = 1 innodb_flush_method = O_DIRECT skip-innodb_doublewrite innodb_data_home_dir=/var/db/mysql/ibdata innodb_log_group_home_dir=/var/db/mysql/iblogs innodb_data_file_path=ibdata1:10M:autoextend innodb_flush_log_at_trx_commit=2 innodb_buffer_pool_size = 310M log-short-format myisam-recover=backup,force expire_logs_days = 5 log-queries-not-using-indexes log-warnings long_query_time = 2 [mysqldump] quick max_allowed_packet = 100M single-transaction skip-lock-tables [mysql] no-auto-rehash [isamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout -- Vladislav V. Prodan System Network Administrator support.od.ua
Re: [freebsd] [mysql][zfs] Странное поведение Mysql - запросы не кешируются
On 06/25/2014 02:35 PM, Vladislav V. Prodan wrote: my.cnf [client] user= root port= 3306 socket = /tmp/mysql.sock [mysqld] port= 3306 bind-address= 127.0.0.1 socket = /tmp/mysql.sock skip-external-locking key_buffer = 14M max_connections = 50 thread_concurrency = 4 tmp_table_size = 24M max_allowed_packet = 1M max_tmp_tables = 128 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M myisam-recover=backup,force query_cache_size = 8M query_cache_limit = 8M thread_cache_size = 64 1) query_cache_type отсутствует 2) 8М query_cache_size мало, поставтье хоть 128.
Re: [freebsd] [mysql][zfs] Странное поведение Mysql - запросы не кешируются
Кэш считается валиден, пока ни одна из таблиц, задействованых в его формировании не альтерится. Кэш не проверяет, то, что изменилось, влияло ли на результат. MySQLTuner 1.2.0 - Major Hayden ma...@mhtx.net Bug reports, feature requests, and downloads at http://mysqltuner.com/ Run with '--help' for additional options and output filtering General Statistics -- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.6.17-log [OK] Operating on 64-bit architecture Storage Engine Statistics --- [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 4M (Tables: 56) [--] Data in InnoDB tables: 2M (Tables: 15) [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 52) [!!] Total fragmented tables: 16 Performance Metrics - [--] Up for: 17h 0m 33s (40M q [666.503 qps], 6K conn, TX: 27B, RX: 13B) [--] Reads / Writes: 98% / 2% [--] Total buffers: 364.0M global + 1.8M per thread (50 max threads) [OK] Maximum possible memory usage: 451.5M (5% of installed RAM) [!!] Slow queries: 74% (30M/40M) [OK] Highest usage of available connections: 62% (31/50) [OK] Key buffer size / total MyISAM indexes: 14.0M/3.7M [OK] Key buffer hit rate: 100.0% (773M cached / 12K reads) [!!] Query cache efficiency: 0.0% (0 cached / 40M selects) [OK] Query cache prunes per day: 0 [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 15M sorts) [!!] Joins performed without indexes: 9702 [OK] Temporary tables created on disk: 0% (893 on disk / 15M total) [OK] Thread cache hit rate: 99% (34 created / 6K connections) [!!] Table cache hit rate: 5% (183 open / 3K opened) [OK] Open file limit used: 0% (193/234K) [OK] Table locks acquired immediately: 99% (103M immediate / 103M locks) [OK] InnoDB data size / buffer pool: 2.0M/310.0M Recommendations - General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 hours - recommendations may be inaccurate Adjust your join queries to always utilize indexes Increase table_cache gradually to avoid file descriptor limits Variables to adjust: query_cache_limit ( 8M, or use smaller result sets) join_buffer_size ( 256.0K, or always use indexes with joins) table_cache ( 2000) my.cnf [client] user= root port= 3306 socket = /tmp/mysql.sock [mysqld] port= 3306 bind-address= 127.0.0.1 socket = /tmp/mysql.sock skip-external-locking key_buffer = 14M max_connections = 50 thread_concurrency = 4 tmp_table_size = 24M max_allowed_packet = 1M max_tmp_tables = 128 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M myisam-recover=backup,force query_cache_size = 8M query_cache_limit = 8M thread_cache_size = 64 default-storage-engine = InnoDB log-bin=mysql-bin server-id = 1 innodb_flush_method = O_DIRECT skip-innodb_doublewrite innodb_data_home_dir=/var/db/mysql/ibdata innodb_log_group_home_dir=/var/db/mysql/iblogs innodb_data_file_path=ibdata1:10M:autoextend innodb_flush_log_at_trx_commit=2 innodb_buffer_pool_size = 310M log-short-format myisam-recover=backup,force expire_logs_days = 5 log-queries-not-using-indexes log-warnings long_query_time = 2 [mysqldump] quick max_allowed_packet = 100M single-transaction skip-lock-tables [mysql] no-auto-rehash [isamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout -- Vladislav V. Prodan System Network Administrator support.od.ua
[freebsd] Re: [freebsd] [mysql][zfs] Странное поведение Mysql - запросы не кешируются
2014-06-25 23:11 GMT+03:00 Alex Samorukov m...@os2.kiev.ua: On 06/25/2014 02:35 PM, Vladislav V. Prodan wrote: my.cnf [client] user= root port= 3306 socket = /tmp/mysql.sock [mysqld] port= 3306 bind-address= 127.0.0.1 socket = /tmp/mysql.sock skip-external-locking key_buffer = 14M max_connections = 50 thread_concurrency = 4 tmp_table_size = 24M max_allowed_packet = 1M max_tmp_tables = 128 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M myisam-recover=backup,force query_cache_size = 8M query_cache_limit = 8M thread_cache_size = 64 1) query_cache_type отсутствует включил 2) 8М query_cache_size мало, поставтье хоть 128. увеличил ничего не изменилось на соседнем сервере query_cache_type | OFF и cache заполнен :( -- Vladislav V. Prodan System Network Administrator support.od.ua
[freebsd] Re: [freebsd] [mysql][zfs] Странное поведение Mysql - запросы не кешируются
2014-06-26 0:05 GMT+03:00 Vladislav V. Prodan ad...@support.od.ua: 1) query_cache_type отсутствует включил 2) 8М query_cache_size мало, поставтье хоть 128. увеличил ничего не изменилось на соседнем сервере query_cache_type | OFF и cache заполнен :( Извините, поторопился. [--] Up for: 7m 12s (266K q [615.803 qps], 143 conn, TX: 200M, RX: 87M) [OK] Query cache efficiency: 99.2% (261K cached / 263K selects) [OK] Query cache prunes per day: 0 На сервере в основном крутится cacto и MyISAM таблицами. Не нравится загрузка 25%-50% CPU Мускулом на слабеньком процессоре AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ -- Vladislav V. Prodan System Network Administrator support.od.ua
Re: [freebsd] Re: [freebsd] [mysql][zfs] Странное поведение Mysql - запросы не кешируются
Здравычвуйте! Такая же ситуация была, после обновления с 5.5 на 5.6 просел сервер, загрузка выросла с 10% до 60%. Загрузка шла на дисковою систему I/O. Указал параметр default_tmp_storage_engine=MyISAM (он пояаился начиная с версии 5.6.3), и сервер вернулся в свои 10%. С чего вдруг так стал пригружать диск InnoDB, я пока не понял. On Thu, Jun 26, 2014 at 12:11:26AM +0300, Vladislav V. Prodan wrote: 2014-06-26 0:05 GMT+03:00 Vladislav V. Prodan ad...@support.od.ua: 1) query_cache_type отсутствует включил 2) 8М query_cache_size мало, поставтье хоть 128. увеличил ничего не изменилось на соседнем сервере query_cache_type | OFF и cache заполнен :( Извините, поторопился. [--] Up for: 7m 12s (266K q [615.803 qps], 143 conn, TX: 200M, RX: 87M) [OK] Query cache efficiency: 99.2% (261K cached / 263K selects) [OK] Query cache prunes per day: 0 На сервере в основном крутится cacto и MyISAM таблицами. Не нравится загрузка 25%-50% CPU Мускулом на слабеньком процессоре AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ -- Vladislav V. Prodan System Network Administrator support.od.ua -- С уважением Главный системный администратор ПАО НБИ Рыбак Владимир