+9.07
Рейтинг
22.06
Сила

Yuran

  • avatar yuri25
  • 0
Что то на altocms.ru не нашел этого плагина… ткни где он есть или кто адаптирует…
  • avatar yuri25
  • 1
А как ты запустил его на 1.0.3? Он вроде как не запускается…
  • avatar yuri25
  • 0
— MYSQL PERFORMANCE TUNING PRIMER — - By: Matthew Montgomery — MySQL Version 5.1.66-0+squeeze1 x86_64

Uptime = 4 days 5 hrs 40 min 10 sec
Avg. qps = 15
Total Questions = 5497639
Threads Connected = 1

Server has been running for over 48hrs.
It should be safe to follow these recommendations

To find out more information on how each of these
runtime variables effects performance visit:

dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
Visit 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 = 10.000000 sec.
You have 0 out of 5497660 that take longer than 10.000000 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 16
Current threads_cached = 15
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 50
Current threads_connected = 1
Historic max_used_connections = 16
The number of used connections is 32% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 94 M
Current InnoDB data space = 465 M
Current InnoDB buffer pool free = 49 %
Current innodb_buffer_pool_size = 1.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: 4.10 G
Configured Max Per-thread Buffers: 6.46 G
Configured Max Global Buffers: 2.03 G
Configured Max Memory Limit: 8.50 G
Physical Memory: 15.62 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 21 M
Current key_buffer_size = 32 M
Key cache miss rate is 1: 483
Key buffer free ratio = 81 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 1.00 G
Current query_cache_used = 482 M
Current query_cache_limit = 1.00 G
Current Query cache Memory fill ratio = 47.07 %
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 = 32 M
Current read_rnd_buffer_size = 4 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 32.00 M
You have had 11616 queries where a join could not use an index properly
You have had 333 joins without keys that check for key usage after each row
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 = 1024 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 = 482 tables
Current table_definition_cache = 256 tables
You have a total of 2264 tables
You have 482 open tables.
Current table_cache hit rate is 0%
, while 100% of your table cache is in use
You should probably increase your table_cache
You should probably increase your table_definition_cache value.


TEMP TABLES
Current max_heap_table_size = 256 M
Current tmp_table_size = 256 M
Of 628336 temp tables, 36% 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 = 64 M
Current table scan ratio = 61: 1
read_buffer_size is over 8 MB there is probably no need for such a large read_bu ffer

TABLE LOCKING
Current Lock Wait ratio = 1: 205453
Your table locking seems to be fine

Вот результат работы скрипта… проблемные места выделил жирным… попробую выполнить что он просит:) Нихрена толком не понимаю в этом...:(
  • avatar yuri25
  • 0
Вот мой my.cnf

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# charset # 1d10t
default-character-set=utf8


# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]
# charset # 1d10t
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'



collation_server = utf8_general_ci
skip-character-set-client-handshake=yes
#
# * Basic Settings
#
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
language	= /usr/share/mysql/english
skip-external-locking
low-priority-updates
bind-address = 127.0.0.1

skip-symbolic-links
skip-networking
skip-name-resolve
skip-federated




#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#
# * Fine Tuning
#
key_buffer		= 256M
key_cache_division_limit= 70
max_allowed_packet	= 16M
thread_stack		= 512K
thread_cache_size       = 128
key_buffer_size		= 32M
table_cache		= 2048
record_buffer		= 8M
max_connections		= 50
sort_buffer_size	= 32M
query_cache_size	= 1G
query_cache_limit	= 1G
query_cache_type	= 1
thread_cache_size	= 16
myisam_sort_buffer_size = 16M
tmp_table_size          = 256M
max_heap_table_size     = 256M
read_buffer_size        = 64M
read_rnd_buffer_size    = 4M
max_sort_length         = 512
max_connect_errors      = 50
max_user_connections    = 150
thread_concurrency	= 8
net_buffer_length       = 32
join_buffer_size        = 32M

max_connect_errors = 1K
max_join_size=256M


table_open_cache        = 512M

interactive_timeout     = 60
wait_timeout            = 60
connect_timeout         =20

myisam-recover         = BACKUP



innodb_buffer_pool_size = 1024M
#innodb_flush_method = O_DIRECT
#innodb_log_file_size = 256M
#innodb_log_buffer_size = 4M
#innodb_flush_log_at_trx_commit = 2
innodb_thread_concurrency = 8



[mysqldump]
quick
quote-names
max_allowed_packet	= 160M



[mysql]
default-character-set=utf8


[isamchk]
key_buffer		= 256M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
  • avatar yuri25
  • 0
Размер баз данных какой(всех на сервере)?
Размер считал так
# cd /var/lib/mysql/
# du -ch */*.MYI

24M итого

пиковая нагрузка какая?

Это наверное значение из конфига? max_connections = 50
Поправьте если не то…

Какой именно MySQL: версия? Oracle/Percona/Maria?

Тут я не совсем понял вопрос, но думаю скорее всего Maria… хотя пес его знает…
# mysql -V
mysql Ver 14.14 Distrib 5.1.66, for debian-linux-gnu (x86_64) using readline 6.1
Еще в phpmyadmin написано Сервер: MySQL (Localhost via UNIX socket)
Версия сервера: 5.1.66-0+squeeze1

на сервере только DB или нет?
Не понял вопроса… Может быть имеется ввиду что сервер используется только для баз данных… Если так — то нет, обычный выделенный сервер с apache, nginx, mysql…

Если нет какие приложения еще стоят из тех что используют DB — что-то кроме LS?

На сервере установлено 8 сайтов на LS, 4 сайта использующие yiiframework, 3 сайта на modx revo, 2 сайта на wordpress, 2 сайта на maxsitecms, 2 сайта на joomla и один на opencart.

Проблем с mysql вроде как нет, проекты не раскручены и малопосещаемые. Просто мне кажется, что сам my.cnf содержит какие нибудь явные косяки. Сейчас я его выложу в следующем комментарии, кто разбирается подскажите может добавить что в него нужно или наоборот убрать… ну и есть ли явные косяки.
  • avatar yuri25
  • 0
Действительно ошибка, исправил — ошибка исчезла, спасибо огромное. Файл sphinx.conf генерировал как здесь описано выше питоновским скриптом, наверное генерит с ошибкой.
  • avatar yuri25
  • 0
В конфиге есть такое
sql_attr_timestamp=topic_data_add

Но при выполнении почему то не видит (не находит)
indexing index 'multitopicsIndex'…
WARNING: attribute 'topic_data_add' not found — IGNORING

Люди, кто разбирается — помогите пожалуйста разобраться что за хрень то такая...:)
  • avatar yuri25
  • 0
Кстати буду благодарен если кто нибудь покажет (выложит) оптимальный my.cnf для такого выделенного сервера:
EX-4 Intel® Core™ i7-2600 или i7-3770 Quad-Core
4 физических ядра,
8 потоков (hyper-threading) 2 x 3 TB HDD SATA3
(software RAID1) 16 GB DDR3
  • avatar yuri25
  • 0
Вот мой конфиг для трех сайтов
# Для первого сайта 

source multiSource
{
type=mysql
sql_host=localhost
sql_user=#################
sql_pass=#################
sql_db=#################
sql_port=3306
sql_sock=/var/run/mysqld/mysqld.sock
mysql_connect_flags=32
sql_query_pre=SET NAMES utf8
sql_query_pre=SET SESSION query_cache_type=OFF
}
source multiTopics : multiSource
{
sql_query= \
SELECT t_fast.topic_id, t_fast.topic_title, UNIX_TIMESTAMP(t_fast.topic_date_add) as topic_date_add, \
                tc.topic_text, t_fast.topic_publish \
                FROM prefix_topic as t_fast, prefix_topic_content AS tc \
                WHERE t_fast.topic_id=tc.topic_id AND t_fast.topic_id>=$start AND t_fast.topic_id<=$end

sql_query_range=SELECT MIN(topic_id),MAX(topic_id) FROM prefix_topic
sql_range_step=1000
sql_attr_uint=topic_publish
sql_attr_timestamp=topic_data_add
sql_attr_multi=uint tag from query; SELECT topic_id, topic_tag_id FROM prefix_topic_tag
sql_ranged_throttle=0
}
source multiComments : multiSource
{
sql_query=\
                        SELECT comment_id, comment_text, UNIX_TIMESTAMP(comment_date) as comment_date, comment_delete \
                        FROM prefix_comment \
                       WHERE target_type='topic' AND comment_id>=$start AND comment_id<=$end


sql_query_range=SELECT MIN(comment_id),MAX(comment_id) FROM prefix_comment
sql_range_step=5000
sql_attr_uint=comment_delete
sql_attr_timestamp=comment_date
}
index multitopicsIndex
{
source=multiTopics
path=/var/lib/data/multiTopics
docinfo=extern
mlock=0
morphology=stem_enru
charset_type=utf-8
html_strip=1
html_remove_elements=style,script,code
}
index multicommentsIndex
{
source=multiComments
path=/var/lib/data/multiComments
docinfo=extern
mlock=0
morphology=stem_enru
charset_type=utf-8
html_strip=1
html_remove_elements=style,script,code
}

# Для второго сайта

source ptzonlineSource
{
type=mysql
sql_host=localhost
sql_user=#################
sql_pass=#################
sql_db=#################
sql_port=3306
sql_sock=/var/run/mysqld/mysqld.sock
mysql_connect_flags=32
sql_query_pre=SET NAMES utf8
sql_query_pre=SET SESSION query_cache_type=OFF
}
source ptzonlineTopics : ptzonlineSource
{
sql_query= \
SELECT t_fast.topic_id, t_fast.topic_title, UNIX_TIMESTAMP(t_fast.topic_date_add) as topic_date_add, \
                tc.topic_text, t_fast.topic_publish \
                FROM prefix_topic as t_fast, prefix_topic_content AS tc \
                WHERE t_fast.topic_id=tc.topic_id AND t_fast.topic_id>=$start AND t_fast.topic_id<=$end

sql_query_range=SELECT MIN(topic_id),MAX(topic_id) FROM prefix_topic
sql_range_step=1000
sql_attr_uint=topic_publish
sql_attr_timestamp=topic_data_add
sql_attr_multi=uint tag from query; SELECT topic_id, topic_tag_id FROM prefix_topic_tag
sql_ranged_throttle=0
}
source ptzonlineComments : ptzonlineSource
{
sql_query=\
                        SELECT comment_id, comment_text, UNIX_TIMESTAMP(comment_date) as comment_date, comment_delete \
                        FROM prefix_comment \
                       WHERE target_type='topic' AND comment_id>=$start AND comment_id<=$end


sql_query_range=SELECT MIN(comment_id),MAX(comment_id) FROM prefix_comment
sql_range_step=5000
sql_attr_uint=comment_delete
sql_attr_timestamp=comment_date
}
index ptzonlinetopicsIndex
{
source=ptzonlineTopics
path=/var/lib/data/ptzonlineTopics
docinfo=extern
mlock=0
morphology=stem_enru
charset_type=utf-8
html_strip=1
html_remove_elements=style,script,code
}
index ptzonlinecommentsIndex
{
source=ptzonlineComments
path=/var/lib/data/ptzonlineComments
docinfo=extern
mlock=0
morphology=stem_enru
charset_type=utf-8
html_strip=1
html_remove_elements=style,script,code
}




# Для третьего сайта

source ptzmediaSource
{
type=mysql
sql_host=localhost
sql_user=#################
sql_pass=#################
sql_db=#################
sql_port=3306
sql_sock=/var/run/mysqld/mysqld.sock
mysql_connect_flags=32
sql_query_pre=SET NAMES utf8
sql_query_pre=SET SESSION query_cache_type=OFF
}
source ptzmediaTopics : ptzmediaSource
{
sql_query= \
SELECT t_fast.topic_id, t_fast.topic_title, UNIX_TIMESTAMP(t_fast.topic_date_add) as topic_date_add, \
                tc.topic_text, t_fast.topic_publish \
                FROM alto_topic as t_fast, alto_topic_content AS tc \
                WHERE t_fast.topic_id=tc.topic_id AND t_fast.topic_id>=$start AND t_fast.topic_id<=$end

sql_query_range=SELECT MIN(topic_id),MAX(topic_id) FROM alto_topic
sql_range_step=1000
sql_attr_uint=topic_publish
sql_attr_timestamp=topic_data_add
sql_attr_multi=uint tag from query; SELECT topic_id, topic_tag_id FROM alto_topic_tag
sql_ranged_throttle=0
}
source ptzmediaComments : ptzmediaSource
{
sql_query=\
                        SELECT comment_id, comment_text, UNIX_TIMESTAMP(comment_date) as comment_date, comment_delete \
                        FROM alto_comment \
                       WHERE target_type='topic' AND comment_id>=$start AND comment_id<=$end


sql_query_range=SELECT MIN(comment_id),MAX(comment_id) FROM alto_comment
sql_range_step=5000
sql_attr_uint=comment_delete
sql_attr_timestamp=comment_date
}
index ptzmediatopicsIndex
{
source=ptzmediaTopics
path=/var/lib/data/ptzmediaTopics
docinfo=extern
mlock=0
morphology=stem_enru
charset_type=utf-8
html_strip=1
html_remove_elements=style,script,code
}
index ptzmediacommentsIndex
{
source=ptzmediaComments
path=/var/lib/data/ptzmediaComments
docinfo=extern
mlock=0
morphology=stem_enru
charset_type=utf-8
html_strip=1
html_remove_elements=style,script,code
}

# Настройка демона

indexer
{
mem_limit=512M
}searchd
{
listen=127.0.0.1:3312
log=/var/log/sphinx/searchd.log
query_log=/var/log/sphinx/query.log
read_timeout=5
max_children=30
pid_file=/var/log/sphinx/searchd.pid
max_matches=100000

compat_sphinxql_magics = 0

}


Запускаю в консоли и вот что наблюдаю…

# /usr/bin/indexer  --rotate --all
Sphinx 2.0.8-id64-release (r3831)
Copyright © 2001-2012, Andrew Aksyonoff
Copyright © 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'multitopicsIndex'...
WARNING: attribute 'topic_data_add' not found - IGNORING
collected 2480 docs, 11.7 MB
collected 1837 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 1.0 Mhits, 100.0% done
total 2480 docs, 11747865 bytes
total 0.765 sec, 15340283 bytes/sec, 3238.36 docs/sec
indexing index 'multicommentsIndex'...
collected 31 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 31 docs, 14431 bytes
total 0.002 sec, 4839369 bytes/sec, 10395.70 docs/sec
indexing index 'ptzonlinetopicsIndex'...
WARNING: attribute 'topic_data_add' not found - IGNORING
collected 11600 docs, 45.5 MB
collected 37797 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 3.2 Mhits, 100.0% done
total 11600 docs, 45508430 bytes
total 2.737 sec, 16625462 bytes/sec, 4237.79 docs/sec
indexing index 'ptzonlinecommentsIndex'...
collected 293 docs, 0.1 MB
sorted 0.0 Mhits, 100.0% done
total 293 docs, 76175 bytes
total 0.009 sec, 7694444 bytes/sec, 29595.95 docs/sec
indexing index 'ptzmediatopicsIndex'...
WARNING: attribute 'topic_data_add' not found - IGNORING
collected 1057 docs, 1.5 MB
collected 1057 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 0.1 Mhits, 100.0% done
total 1057 docs, 1520600 bytes
total 0.168 sec, 9049520 bytes/sec, 6290.50 docs/sec
indexing index 'ptzmediacommentsIndex'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.000 sec, 0 bytes/sec, 0.00 docs/sec
total 65919 reads, 0.017 sec, 0.2 kb/call avg, 0.0 msec/call avg
total 89 writes, 0.019 sec, 413.0 kb/call avg, 0.2 msec/call avg
rotating indices: successfully sent SIGHUP to searchd (pid=2008).


Видно, что на все три сайта ругается этим
WARNING: attribute 'topic_data_add' not found — IGNORING

Я грешу, что что то с мускулем я перемудрил… конфиг сфинкса я не менял… а вот в my.cnf менял там что то недавно… все ускорить пытался:)
  • avatar yuri25
  • 0
Наверное я что то намудрил с настройками mysql…
  • avatar yuri25
  • 0
Почему то последнее время процесс поиска по крону стал такое выдавать:
WARNING: attribute 'topic_data_add' not found - IGNORING...

Никто не сталкивался с подобным?
  • avatar yuri25
  • 0
Ну прости тогда… я тебя плюсанул в парофиль:))
  • avatar yuri25
  • 4
Уважаемый, не говори за меня, ок? Мне что каждому по отдельности объяснят что никто ничего не забил, просто есть много других дел?!
Не надо никому ничего объяснять, если есть много других дел то сразу и нужно обозначить, что адаптации не будет или адаптация будет платная… Вы обещать можете что угодно, кому угодно и сколько угодно, но моему проекту нужны адаптации плагинов уже сейчас. И поэтому мне проще купить другой шаблон. Без обид.
  • avatar yuri25
  • 0
Блин забыл после каталога переавторизоваться:) когда же ort сделает все на один аккаунт…
  • avatar yuri25
  • 0
В том то и дело, что установлен и включен этот плагин версия 1.0.3. При просмотре его настроек в админке он выдает:
Список плагинов, которые хранят конфиги в БД (0)
Хранящихся конфигов плагинов в БД нету.

Тем не менее установлен adminusers который не работает без CE…
  • avatar yuri25
  • 0
В топике по ссылке выше «серьезная проблема» была решена… с галереей тоже порядок, а вот с плагином admin users бяда… постоянно шлет эту хрень
Action: "error" (PluginFatalmessenger_ActionError) 
Event: "500" 
Error number:
1
Error message:
Class 'CE' not found
File:
/...../plugins/adminusers/classes/modules/adminusers/Adminusers.class.php
Line:
42

Кто нибудь знает что за класс CE ему нужен?
  • avatar yuri25
  • 1
У меня в шаблоне вместо
{if $sAction=='index'}
      {assign var="sSiteTitleTag" value="h1"}
      {assign var="sSiteDescriptionTag" value="h2"}
    {else}
      {assign var="sSiteTitleTag" value="h2"}
      {assign var="sSiteDescriptionTag" value="h3"}
    {/if}
  
    <{$sSiteTitleTag} class="site-name"><a href="{cfg name='path.root.web'}">
{cfg name='view.name'}</a></{$sSiteTitleTag}>
    <{$sSiteDescriptionTag} class="site-description">
{cfg name='view.description'}</{$sSiteDescriptionTag}>
сделано так
<h1 class="site-name"><a href="{cfg name='path.root.web'}" 
title="{cfg name='view.description'}">{cfg name='view.name'}</a></h1>


Сейчас уже не помню, но тоже делал по какому то топику. Это вообще нормально?
  • avatar yuri25
  • 1
Он занимается глобальным продвижением крупных проектов;) вы же читали его недавний топик:)
  • avatar yuri25
  • 0
Есть предложение: плагины, которые проверены автором и не нуждаются в адаптации тоже вынести вверх в список адаптированных (совместимых) плагинов чтобы пользователи лишнее по сто раз не писали в хотелках адаптаций. Тогда будут писать только те, которым действительно необходима адаптация. vOFFka а как насчет адаптации различных платных плагинов — напрмер contest или компании…
  • avatar yuri25
  • 2
О привет вражина;) Ты сразу попал в точку и определил причину проблемы, спасибо огромное… и прости меня за все;)

PS. А мне нужно записывать что когда где меняю:)