ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Нагрузка на FreeBSD



Нет, Mysql собирал из портов. Нигде статико не указывал. Что-то я подзабыл, как это в BSD делаетя (кроме как руками из исходников), но я поспрашиваю у гугла.
а my.cnf вот:

[mysql]
character-sets-dir=/usr/local/share/mysql/charsets
default-character-set=cp1251

[mysqladmin]
character-sets-dir=/usr/local/share/mysql/charsets
default-character-set=cp1251

[mysqlcheck]
character-sets-dir=/usr/local/share/mysql/charsets
default-character-set=cp1251

[mysqldump]
character-sets-dir=/usr/local/share/mysql/charsets
default-character-set=cp1251

[mysqlimport]
character-sets-dir=/usr/local/share/mysql/charsets
default-character-set=cp1251

[mysqlshow]
character-sets-dir=/usr/local/share/mysql/charsets
default-character-set=cp1251

[myisamchk]
character-sets-dir=/usr/local/share/mysql/charsets

[mysqld_safe]
err-log                                         = /var/log/mysql/mysql.err

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
[mysqld]
max_connections                 = 60
default-character-set           = cp1251
character-set-server            = cp1251
user                            = mysql
port                            = 3306
log-error                       = /var/log/mysql/mysqld.err
skip-locking
key_buffer                      = 8M
max_allowed_packet              = 1000M
table_cache                     = 512
sort_buffer_size                = 2M
net_buffer_length               = 16K
read_buffer_size                = 1M
read_rnd_buffer_size            = 1M
myisam_sort_buffer_size         = 2M
record_buffer                   = 2M
thread_cache                    = 16
thread_concurrency              = 8
query_cache_size                = 16M
language                        = /usr/local/share/mysql/english/

init-connect                    = "SET NAMES cp1251"

bind-address                    = 72.36.130.82
innodb_buffer_pool_size = 16M
# this is the default, increase it if you have lots of tables
innodb_additional_mem_pool_size = 8M
#
# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(
# and upstream wants things to be under /var/lib/mysql/, so that's the route
# we have to take for the moment
innodb_data_home_dir            = /var/db/mysql/
innodb_log_arch_dir             = /var/db/mysql/
innodb_log_group_home_dir       = /var/db/mysql/
# you may wish to change this size to be more suitable for your system
# the max is there to avoid run-away growth on your machine
innodb_data_file_path = ibdata1:10M:autoextend:max:128M
# we keep this at around 25% of of innodb_buffer_pool_size
# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
innodb_log_file_size = 5M
# this is the default, increase it if you have very large transactions going on
innodb_log_buffer_size = 8M
# this is the default and won't hurt you
# you shouldn't need to tweak it
set-variable = innodb_log_files_in_group=2
# see the innodb config docs, the other options are not always safe
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet                      = 1000M

[mysql]
# uncomment the next directive 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


2007/1/12, Andrey Y. Ostanovsky <andrey@xxxxxxxxxxxxxxxxx >:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Дмитрий Леоненко wrote:
> MaxRequestsPerChild  100 newinst htdocs # pgrep httpd | wc -l 99
> newinst htdocs # top last pid: 55269;  load averages: 70.58, 52.99,
> 49.17 up 0+05:51:52  16:31:43 199 processes: 70 running, 128
> sleeping, 1 zombie CPU states: 90.1% user,  0.9% nice,  8.5%
> system,  0.5% interrupt, 0.0%idle Mem: 791M Active, 438M Inact,
> 226M Wired, 2852K Cache, 112M Buf, 543M Free Swap: 2048M Total, 86M
> Used, 1962M Free, 4% Inuse
>
> PID USERNAME    THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU
> COMMAND 602 mysql        63   4    0   121M 47760K sbwait 0  57:40
> 25.83% mysqld

Два момента - там у Вас в конфиге апача таймаут 600 -> у меня 60.
Ну и mysql подозрительно много жрет процессора для занимаемого им
объема памяти.  Либо недавно запущен и не набрал хитов, либо
неоптимально память в my.cnf выделена.

  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
  602 mysql      12  20    0   459M   451M kserel  66.3H 13.57% mysqld

Для показанной Вами нагрузке на апачи - должно быть что-то похожее,
если не больше, по памяти.
Надеюсь, mysql собран статиком?:)

- --
Best regards, Andrey Y. Ostanovsky
St. Petersburg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFp5EweRcoIiq+xnoRAhDzAJ9+vEU7u6/CZchHjpXPHkyWH/LtqACeO6gy
+kWqeN7E/FB8qc4g5SVlWVo=
=3Dfj
-----END PGP SIGNATURE-----




 




Copyright © Lexa Software, 1996-2009.