Зачем тарить? Отправляйте rsync'ом
rsync -avz -e ssh --exclude=ЧТО_НЕ_НУЖНО_НАПРИМЕР_logs --exclude=ЕЩЕ_НЕ_НУЖНОЕ /home/u324324/www/site.ru/ newuser@newserver:/path/to/new/site.ru
обратите внимание, что на старом сервере site.ru/ со слешем на конце, на новом без, если поставить "новый слеш", то сайт переместиться в подпапку site.ru/site.ru (не уверен)
mysqlreport
Use of uninitialized value $is in multiplication (*) at ./mysqlreport line 829. Use of uninitialized value in formline at ./mysqlreport line 1227. Use of uninitialized value in formline at ./mysqlreport line 1235. MySQL 5.5.30-1~dotdeb.0 uptime 0 9:13:19 Fri Apr 12 08:20:45 2013 __ Key _________________________________________________________________ Buffer used 24.98M of 1.00G %Used: 2.44 Current 211.70M %Usage: 20.67 Write hit 75.27% Read hit 99.91% __ Questions ___________________________________________________________ Total 2.83M 85.4/s QC Hits 1.93M 58.0/s %Total: 67.99 DMS 593.12k 17.9/s 20.93 Com_ 221.37k 6.7/s 7.81 COM_QUIT 92.76k 2.8/s 3.27 -Unknown 108 0.0/s 0.00 Slow 5 s 5 0.0/s 0.00 %DMS: 0.00 Log: OFF DMS 593.12k 17.9/s 20.93 SELECT 425.24k 12.8/s 15.01 71.69 UPDATE 144.07k 4.3/s 5.08 24.29 INSERT 21.88k 0.7/s 0.77 3.69 DELETE 1.95k 0.1/s 0.07 0.33 REPLACE 0 0/s 0.00 0.00 Com_ 221.37k 6.7/s 7.81 set_option 156.98k 4.7/s 5.54 change_db 63.75k 1.9/s 2.25 lock_tables 84 0.0/s 0.00 __ SELECT and Sort _____________________________________________________ Scan 60.91k 1.8/s %SELECT: 14.32 Range 188.56k 5.7/s 44.34 Full join 68 0.0/s 0.02 Range check 0 0/s 0.00 Full rng join 229 0.0/s 0.05 Sort scan 10.94k 0.3/s Sort range 63.85k 1.9/s Sort mrg pass 0 0/s __ Query Cache _________________________________________________________ Memory usage 186.69M of 256.00M %Used: 72.93 Block Fragmnt 9.15% Hits 1.93M 58.0/s Inserts 365.69k 11.0/s Insrt:Prune 2.51:1 6.6/s Hit:Insert 5.27:1 __ Table Locks _________________________________________________________ Waited 36 0.0/s %Total: 0.00 Immediate 759.84k 22.9/s __ Tables ______________________________________________________________ Open 4141 of 5242 %Cache: 0.79 Opened 20.19k 0.6/s __ Connections _________________________________________________________ Max used 35 of 250 %Max: 14.00 Total 92.82k 2.8/s __ Created Temp ________________________________________________________ Disk table 5.27k 0.2/s Table 12.88k 0.4/s Size: 16.0G File 324 0.0/s __ Threads _____________________________________________________________ Running 1 of 1 Cached 34 of 400 %Hit: 99.96 Created 35 0.0/s Slow 0 0/s __ Aborted _____________________________________________________________ Clients 105 0.0/s Connects 22 0.0/s __ Bytes _______________________________________________________________ Sent 9.41G 283.3k/s Received 524.37M 15.8k/s __ InnoDB Buffer Pool __________________________________________________ Usage 351.70M of 8.00G %Used: 4.29 Read hit 99.73% Pages Free 501.78k %Total: 95.71 Data 22.28k 4.25 %Drty: 0.35 Misc 233 0.04 Latched 0.00 Reads 7.48M 225.2/s From file 20.44k 0.6/s 0.27 Ahead Rnd 0 0/s Ahead Sql 0/s Writes 1.22M 36.8/s Flushes 348.77k 10.5/s Wait Free 0 0/s __ InnoDB Lock _________________________________________________________ Waits 29 0.0/s Current 0 Time acquiring Total 596 ms Average 20 ms Max 158 ms __ InnoDB Data, Pages, Rows ____________________________________________ Data Reads 20.93k 0.6/s Writes 404.74k 12.2/s fsync 77.00k 2.3/s Pending Reads 0 Writes 0 fsync 1 Pages Created 1.35k 0.0/s Read 20.92k 0.6/s Written 348.77k 10.5/s Rows Deleted 10.02k 0.3/s Inserted 3.98k 0.1/s Read 2.67M 80.4/s Updated 132.52k 4.0/s
query_cache_size поднимать не хочу, ИМХО, будут только лишь тормоза.
Сервер слушает серый айпишник
Тестовый стенд, там я развернул персону, и она удаленно находится на другом сервере, не где лежат скрипты. Сервера физически стоят рядом и объединены одним свитчем. В связи с этим вопрос, может ли это быть какой-нибудь другой косяк (tcp к примеру)?
На боевой машине так же слушается серый айпишник, но в данный момент все лежит рядом.
Наврал я вам, sleep'ов там 90-100, но ничего кроме sleep'ов.
Были мысли по этому поводу, но посмотрев iotop - все отпало. Попробую на тестовом всю базу вовсе в оперативке держать.
Сейчас кактус поставлю, дам графики и прочий выхлоп
Пардон, thread_concurrency выставлен завышенно, игрался с параметрами (кажется в офф документации говорится что начать можно с формулы 2*CPU, а не что должно быть равно)
в slow был один запрос > 5 секунд за ночь. На тестовой машине стоит именно персона сервер.
Авторизованных не так много онлайн 10-30 человек, анонимусов в пике до 900, но тут проблем нет, ибо кеш.
БД суммарно ~9 гигов. Есть базы данных в myisam, внутренние маленькие сайтики в innodb не нуждающиеся.
В первом посте в конце mysql status это без бенчмарка.
Ну и к слову - все работает без апача - nginx + php5-fpm + mysql + memcached + apc.---------- Post added 12-04-2013 at 08:22 ----------
3.5G, видимо выставлял я это, когда на этом же сервере был дамп этой же БД (для девелопа, все такое)
Беда у меня с фрагментированными таблицами, сколько не оптимизируй, все равно число значительно не уменьшается - за один прогон mysqlcheck -o -A --auto-repair число таблиц уменьшается на ~80, подозрезваю что в этом тоже может быть косяк.
Это все вывод с боевого сервера.
mysqltuner.pl
>> MySQLTuner 1.2.0 - Major Hayden <major@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.5.30-1~dotdeb.0-log [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 6G (Tables: 2092) [--] Data in InnoDB tables: 3G (Tables: 1877) [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17) [!!] Total fragmented tables: 1919 -------- Security Recommendations ------------------------------------------- [OK] All database users have passwords assigned -------- Performance Metrics ------------------------------------------------- [--] Up for: 9h 6m 41s (2M q [84.621 qps], 90K conn, TX: 9B, RX: 506M) [--] Reads / Writes: 71% / 29% [--] Total buffers: 25.3G global + 160.2M per thread (250 max threads) [!!] Maximum possible memory usage: 64.4G (103% of installed RAM) [OK] Slow queries: 0% (1/2M) [OK] Highest usage of available connections: 14% (35/250) [OK] Key buffer size / total MyISAM indexes: 1.0G/919.0M [OK] Key buffer hit rate: 99.9% (27M cached / 24K reads) [OK] Query cache efficiency: 82.0% (1M cached / 2M selects) [!!] Query cache prunes per day: 371203 [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 73K sorts) [!!] Temporary tables created on disk: 29% (5K on disk / 17K total) [OK] Thread cache hit rate: 99% (35 created / 90K connections) [OK] Table cache hit rate: 25% (4K open / 16K opened) [OK] Open file limit used: 6% (4K/65K) [OK] Table locks acquired immediately: 99% (742K immediate / 742K locks) [OK] InnoDB data size / buffer pool: 3.5G/8.0G -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 hours - recommendations may be inaccurate Reduce your overall MySQL memory footprint for system stability Enable the slow query log to troubleshoot bad queries Increasing the query_cache size over 128M may reduce performance Temporary table size is already large - reduce result set size Reduce your SELECT DISTINCT queries without LIMIT clauses Variables to adjust: *** MySQL's maximum memory usage is dangerously high *** *** Add RAM before increasing MySQL buffer variables *** query_cache_size (> 256M) [see warning above]
tuning-primer.sh
-- MYSQL PERFORMANCE TUNING PRIMER -- - By: Matthew Montgomery - MySQL Version 5.5.30-1~dotdeb.0-log x86_64 Uptime = 0 days 9 hrs 11 min 35 sec Avg. qps = 85 Total Questions = 2820823 Threads Connected = 1 Warning: Server has not been running for at least 48hrs. It may not be safe to use these recommendations To find out more information on how each of these runtime variables effects performance visit: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html Visit http://www.mysql.com/products/enterprise/advisors.html for info about MySQL's Enterprise Monitoring and Advisory Service SLOW QUERIES The slow query log is NOT enabled. Current long_query_time = 5.000000 sec. You have 4 out of 2820844 that take longer than 5.000000 sec. to complete Your long_query_time seems to be fine BINARY UPDATE LOG The binary update log is enabled Binlog sync is not enabled, you could loose binlog records during a server crash WORKER THREADS Current thread_cache_size = 400 Current threads_cached = 32 Current threads_per_sec = 0 Historic threads_per_sec = 0 Your thread_cache_size is fine MAX CONNECTIONS Current max_connections = 250 Current threads_connected = 3 Historic max_used_connections = 35 The number of used connections is 14% of the configured maximum. Your max_connections variable seems to be fine. INNODB STATUS Current InnoDB index space = 505 M Current InnoDB data space = 3.48 G Current InnoDB buffer pool free = 95 % Current innodb_buffer_pool_size = 8.00 G Depending on how much space your innodb indexes take up it may be safe to increase this value to up to 2 / 3 of total system memory MEMORY USAGE Max Memory Ever Allocated : 14.80 G Configured Max Per-thread Buffers : 39.16 G Configured Max Global Buffers : 9.32 G Configured Max Memory Limit : 48.48 G Physical Memory : 62.48 G Max memory limit seem to be within acceptable norms KEY BUFFER Current MyISAM index space = 919 M Current key_buffer_size = 1.00 G Key cache miss rate is 1 : 1114 Key buffer free ratio = 79 % Your key_buffer_size seems to be fine QUERY CACHE Query cache is enabled Current query_cache_size = 256 M Current query_cache_used = 186 M Current query_cache_limit = 24 M Current Query cache Memory fill ratio = 72.88 % Current query_cache_min_res_unit = 4 K MySQL won't cache query results that are larger than query_cache_limit in size SORT OPERATIONS Current sort_buffer_size = 128 M Current read_rnd_buffer_size = 24 M Sort buffer seems to be fine JOINS Current join_buffer_size = 4.00 M You have had 68 queries where a join could not use an index properly join_buffer_size >= 4 M This is not advised You should enable "log-queries-not-using-indexes" Then look for non indexed joins in the slow query log. OPEN FILES LIMIT Current open_files_limit = 65535 files The open_files_limit should typically be set to at least 2x-3x that of table_cache if you have heavy MyISAM usage. Your open_files_limit value seems to be fine TABLE CACHE Current table_open_cache = 524288 tables Current table_definition_cache = 524288 tables You have a total of 4010 tables You have 4141 open tables. The table_cache value seems to be fine TEMP TABLES Current max_heap_table_size = 16.00 G Current tmp_table_size = 16.00 G Of 12869 temp tables, 29% were created on disk Perhaps you should increase your tmp_table_size and/or max_heap_table_size to reduce the number of disk-based temporary tables Note! BLOB and TEXT columns are not allow in memory tables. If you are using these columns raising these values might not impact your ratio of on disk temp tables. TABLE SCANS Current read_buffer_size = 4 M Current table scan ratio = 47 : 1 read_buffer_size seems to be fine TABLE LOCKING Current Lock Wait ratio = 1 : 21633 Your table locking seems to be fine
Спасибо
Как я понял, если я октазываюсь сейчас - 7ого марта сервер снимают полностью и мне не надо будет ничего доплачивать?
Добрый день!
Вопрос у меня по поводу отказа от серверов. Я знаю, что отказ происходит за месяц. Разъясните мне на конкретном примере - если я сегодня откажусь от серверов с 31ого марта, они проработают до конца марта и снимут их? Дополнительные деньги с меня снимут (с учетом того, что сервера оплачиваются в начале месяца)?
В DC13 сервер пролежал менее 15 минут, с 9.07 до 9.20.
Но тенденция удручает, у меня как раз на одном из серверов сегодня будет ответственное мероприятие
http://ru.hetzner.com/ лежит, сколько там надо умножать? 0.81?
Добрый вечер всем. Это снова я, выдали мне серваки только что, и вот беда, там айпишки 5.x.x.x, как там обстоит ситуация с хамачем щас? и помнится тут был человек с 5ой подсетью с проблемами, как он решил? Переехал на другой ip?
Логично. Осталось узнать цену свитчей. Спасибо
Доброе! Задумался тут, а как организовывается private lan? прямым аплинком из сервера в сервер? Или посредством VLAN на коммутаторах?
Если первое, то для количества 3х и более серверов, нужно докупать n-1 сетевых карточек? О_о