tutochkin

Рейтинг
0
Регистрация
02.10.2016
netwind:
старый владелец аккаунта отлично на русском общался.

Я этого не знал. Тогда лучше текущего владельца аккаунта спросить почему английский?

Оффтоп здесь не приветствуется, наверно)

---------- Добавлено 03.10.2016 в 11:00 ----------

Andreyka:
Они самые, которые на php.

А можно как-то выявить какие именно скрипты могут грузить? До обращения к веб-разработчикам сайта.

Andreyka:
Проблема не в настройках сервера, а в скриптах. Их надо профилировать.

Скрипты сайта вы имеете ввиду?

Stek:
Просто народ со своим кривым английским решил не вмешиваться, вы уж так выпендрились %)

Может человеку понятней на английском. Я же не знаю. Тем более сразу написал, что я хреново общаюсь на этом языке) Но мы уже отклонились от темы.

Нагрузка как была, так и есть. Благодаря mysqltuner.pl поправил некоторые параметры. Но все равно идет нагрузка.


** SIEGE 3.0.5
** Preparing 350 concurrent users for battle.
The server is now under siege...
Lifting the server siege... done.
Transactions: 52 hits
Availability: 100.00 %
Elapsed time: 19.55 secs
Data transferred: 2.13 MB
Response time: 12.98 secs
Transaction rate: 2.66 trans/sec
Throughput: 0.11 MB/sec
Concurrency: 34.52
Successful transactions: 52
Failed transactions: 0
Longest transaction: 19.03
Shortest transaction: 0.00
tls:
Кэширование видимо и сработало:

[--] Up for: 21m 56s (454 q [0.345 qps], 154 conn, TX: 67K, RX: 31K)
[--] Reads / Writes: 100% / 0%
[OK] Slow queries: 0% (0/454)
[OK] Highest usage of available connections: 0% (1/300)

Как нагрузку-то уменьшить. Сервер мощный все таки+ оператива мало используется

---------- Добавлено 02.10.2016 в 21:42 ----------

Andreyka:
Дело было не в бобине - пыхэпэ сидел в кабине...

Я не понял к чему это(

Оптимизайка:
By "read-only" users I've mean the sessionless users (i.e. unregistered ones). Most of CMS uses a cookie to distinguish registered users from unregistered ones, so you can use Nginx "out-of-box" caching like this:

https://habrahabr.ru/post/124684/

Unfortunately, MODx uses php session cookie for unregistered users too. So, you have to slightly modify MODx code to add another cookie that will set only for registered users.

This caching is therefore on nginx.

Оптимизайка:
1. According to your Apache configuration, the real number of concurrent users are limited by 250 (MaxRequestWorkers). When you run Siege, additional concurrent users are queued, so increasing of this parameter will not help.
2. Even that amount of concurrent users can easily overload of single CPU (without proper caching).
3. So, if you need to serve that large amount of requests, you definitely should use caching for "read-only" users by configuring Nginx.

How to make a "read-only" in configuring Nginx? Nginx now works as a reverse-proxy. Static files given to Nginx, php - Apache2.

Оптимизайка:
Does another site use some of caching features? Which CMS/engine/script is used on both sites?

1 site is used MODx evolution

2 site is used MODx revolution

This is sites are not mine, therefore i can not say now about caching.

Generally used caching nginx and memcached.

Оптимизайка:
350 concurrent users? 100% CPU load is OK in that case.

(i bad speak English) Hmm..i think not is OK, because another site can withstand the load. And load CPU 55-70%.

В apache2 в error.log еще появилось вот что:


[Sun Oct 02 14:24:25.439957 2016] [mpm_prefork:notice] [pid 12659] AH00163: Apache/2.4.10 (Ubuntu) configured -- resuming normal operations
[Sun Oct 02 14:24:25.440071 2016] [core:notice] [pid 12659] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 02 15:19:56.157850 2016] [mpm_prefork:error] [pid 12659] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
[Sun Oct 02 15:45:42.516825 2016] [mpm_prefork:notice] [pid 12659] AH00169: caught SIGTERM, shutting down
[Sun Oct 02 15:45:43.675760 2016] [mpm_prefork:notice] [pid 28108] AH00163: Apache/2.4.10 (Ubuntu) configured -- resuming normal operations
[Sun Oct 02 15:45:43.675840 2016] [core:notice] [pid 28108] AH00094: Command line: '/usr/sbin/apache2'

по mpm:


<IfModule mpm_prefork_module>
StartServers 10
MinSpareServers 10
MaxSpareServers 10
MaxRequestWorkers 250
MaxConnectionsPerChild 0
</IfModule>