X   Сообщение сайта
(Сообщение закроется через 3 секунды)



 

Здравствуйте, гость (

| Вход | Регистрация )

Открыть тему
Тема закрыта
> Помогите с настройками VDS, Не занаю как настроить my.cnf
Garik666
Garik666
Topic Starter сообщение 28.10.2008, 17:44; Ответить: Garik666
Сообщение #1


Заказал себе VDS с панелью ISPmanager:
Память адресуемая/гарантированная - 288/96

Использование CPU - 10% от Intel Xeon 5120

Я не могу разобраться как настроить для нормальной работы - сайты медленно грузятся и т.д.

В тех потдержке мне написали:
______________________
В /etc/my.cnf повысьте значения буферов чтения, и других, т.к. по-умолчанию они занижены из расчета на минимальную конфигурацию.
_____________________________

Но я не шарю как это делать, ещё не доучил до этого.
Помогите с этой проблемой.
ВОт вылаживаю my.cnf - что туд нужно поменять.
_________________________________________

# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/db/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1

# Uncomment the following if you want to log updates
#log-bin=mysql-bin

# Uncomment the following if you are NOT using BDB tables
skip-bdb

skip-innodb

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/db/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/db/mysql/
#innodb_log_arch_dir = /var/db/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout


__________________________________________

Заранее благодарен.


--------------------
)
0
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
alexa
alexa
сообщение 28.10.2008, 19:35; Ответить: alexa
Сообщение #2


вот мои настройки на дебиане
#
# 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

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

[mysqld]
#
# * 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
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = 127.0.0.1
#
# * Fine Tuning
#
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 128K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover          = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log            = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries       = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id              = 1
#log_bin                        = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
max_binlog_size         = 100M
#binlog_do_db           = include_database_name
#binlog_ignore_db       = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
skip-innodb
#
# * Federated
#
# The FEDERATED storage engine is disabled since 5.0.67 by default in the .cnf files
# shipped with MySQL distributions (my-huge.cnf, my-medium.cnf, and so forth).
#
skip-federated
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet      = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer              = 16M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


#
# * 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/


--------------------


Поблагодарили: (2)
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
sZend
sZend
сообщение 28.10.2008, 19:42; Ответить: sZend
Сообщение #3


Мои настройки при памяти 380 с копейками и оптимизировано под "сложные" запросы Bitrix и Drupal:
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/db/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
set-variable = max_connections=12

port = 3306
socket = /tmp/mysql.sock
skip-locking

key_buffer = 4M
max_allowed_packet = 8M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 512K
read_rnd_buffer_size = 1M

myisam_sort_buffer_size = 8M

thread_cache = 8
query_cache_size= 2M
query_cache_limit = 8M

join_buffer_size = 1M

net_buffer_length = 8K
thread_stack = 64K
max_heap_table_size = 64M
#set-variable = tmp_table_size = 32M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1

# Uncomment the following if you want to log updates
#log-bin=mysql-bin

# Uncomment the following if you are NOT using BDB tables
skip-bdb

skip-innodb

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/db/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/db/mysql/
#innodb_log_arch_dir = /var/db/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[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


--------------------


Поблагодарили: (2)
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
sZend
sZend
сообщение 29.10.2008, 16:45; Ответить: sZend
Сообщение #4


Хотел помочь с инфой по настройке но кончился инет (спасибо провайдеру).
Так вот есть скрипт написаный под unix shell http://www.day32.com/MySQL/tuning-primer.sh который проверяет сколько каких запросов прошло с последней перезагрузки Mysql сервера, сколько раз очищался кеш, сколько было задействовано и т. д.
После запуска скрипт дает условные рекомендации где что увеличить и что уменьшить.
Перед запуском скрипта нужно что-бы mysql сервер работал не менее суток, иначе результат диагностики будет далек от идеала.


--------------------


Поблагодарили: (1)
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
Garik666
Garik666
Topic Starter сообщение 29.10.2008, 20:24; Ответить: Garik666
Сообщение #5


Хотел помочь с инфой по настройке но кончился инет (спасибо провайдеру).
Так вот есть скрипт написаный под unix shell http://www.day32.com/MySQL/tuning-primer.sh который проверяет сколько каких запросов прошло с последней перезагрузки Mysql сервера, сколько раз очищался кеш, сколько было задействовано и т. д.
После запуска скрипт дает условные рекомендации где что увеличить и что уменьшить.
Перед запуском скрипта нужно что-бы mysql сервер работал не менее суток, иначе результат диагностики будет далек от идеала.



подскажи пожалуйста, что делать с этим скриптиком?


--------------------
)
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
sZend
sZend
сообщение 30.10.2008, 0:54; Ответить: sZend
Сообщение #6


Этот скрипт нужно скопировать в любую папку (называю "папкой" а не директорией потому что так короче) на серваке, выставить права чтоб было "выполнение" например 755, и запустить из терминала. (лучший телнет клиент который я нашел это "AbsoluteTelnet Telnet / SSH Client" покупать здесь: http://www.celestialsoftware.net/ , "Putty" и им подобные рядом не валялись)

Внимание ! Как исполнять скрипт!
Если Вы скопировали скрипт например в папку /home/vasya и находитесь в этой же папке, то выполнить скрипт можно либо коммандой:
a) с абсолютным путем
/home/vasya/tuning-primer.sh

либо с относительным
./tuning-primer.sh

(вначале точка и слеш)
и все, красным цветом (для "настояших" телнет клиентов) помечены проблемные параметры.


--------------------
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
alexa
alexa
сообщение 30.10.2008, 19:37; Ответить: alexa
Сообщение #7


Посоветуйте плиз как проверить VDS на скорость (даёт ли провайдер заявленную скорость процессора).
или может есть какой то скриптик для проверки (нагрузка на проц и в конце результат выполнения)


--------------------
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
Garik666
Garik666
Topic Starter сообщение 31.10.2008, 12:54; Ответить: Garik666
Сообщение #8


попробуй через шел. Скачай к примеру putty.exe
И после его запуска пропиши команду top
И там всё увидешь.


--------------------
)
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
faiber
faiber
сообщение 31.10.2008, 13:15; Ответить: faiber
Сообщение #9


# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/db/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1

# Uncomment the following if you want to log updates
#log-bin=mysql-bin

# Uncomment the following if you are NOT using BDB tables
skip-bdb

skip-innodb

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/db/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/db/mysql/
#innodb_log_arch_dir = /var/db/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 64M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 16M
sort_buffer_size = 32M

[myisamchk]
key_buffer = 16M
sort_buffer_size = 32M

[mysqlhotcopy]
interactive-timeout


Вот так попробуй, но в этом не вижу смысла у тебя сировно ограничение на ресурсы а так же с доступом VDS к центральной памяти.
а ещё лучи конфиг httpd,conf настроить правильно, и буфиризацию на сервере включить (или VDS)

Замечание модератора:
Эта тема была закрыта автоматически ввиду отсутствия активности в ней на протяжении 100+ дней.
Если Вы считаете ее актуальной и хотите оставить сообщение, то воспользуйтесь кнопкой
или обратитесь к любому из модераторов.


Сообщение отредактировал faiber - 31.10.2008, 13:17


--------------------
Вернуться в начало страницы
 
Ответить с цитированием данного сообщения
Открыть тему
Тема закрыта
2 чел. читают эту тему (гостей: 2, скрытых пользователей: 0)
Пользователей: 0


Свернуть

> Похожие темы

  Тема Ответов Автор Просмотров Последний ответ
Горячая тема (нет новых ответов) Тема имеет прикрепленные файлыPQ.HOSTING - VPS/VDS - MD, UA, USA, HK, LV, NL, RU, CA, DE, SK, CZE, GB, IL, TR, PL, BG, RO, IT, FL, HU
77 pqhosting 36384 19.3.2024, 13:13
автор: pqhosting
Открытая тема (нет новых ответов) Помогите вспомнить рекламного бота Телеграм для обмена рекламой
0 Mixatraider 725 21.2.2024, 23:42
автор: Mixatraider
Открытая тема (нет новых ответов) Помогите рещить проблему с монитором.
Почему низкое разрешение при подключении монитора через displayport?
0 Levels 1702 11.12.2020, 0:48
автор: Levels
Открытая тема (нет новых ответов) Помогите кто нибудь получить партнерку Росбанк!
7 heisenberg_mw 2340 7.8.2020, 9:28
автор: heisenberg_mw
Открытая тема (нет новых ответов) Помогите найти тему пожалуйста
7 virtas 12474 24.7.2020, 17:02
автор: -JamesSmips-


 



RSS Текстовая версия Сейчас: 19.4.2024, 12:08
Дизайн