То есть роутер дайет такую же производительность, как и выделенный сервер? Мне даже уже не смешно... Да, железки от ASUS не плохи. Но вот только производительность такого сервера стремится к нулю при минимальной загрузке...
---------- Добавлено 24.11.2014 в 20:51 ----------
Кстати, как умудрились битрикс на ~20 соединений уложить в 8M RAM? ))). Фальсификаторы такие фальсификаторы...
zpjekan, Если для экспериментов - поставьте на домашнем компутере VirtualBOX и не тратьте деньги. А если для дела - там еще кроме этого файла много где и чего прописано, можете не предусмотреть. То есть, я подозреваю, что Вам нужно не просто прописать виртуалхост, так что, скорее всего, ошибетесь.
pupseg, файл вернет, а измененный конфиг ядра - нет.
Конфиги я не трогал. Дефолтные. Вот вывод с консоли:
[root@localhost woolf]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
[root@localhost woolf]# cat /etc/sysctl.d/*
vm.swappiness = 1
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
[root@localhost woolf]# cat /run/sysctl.d/*
cat: /run/sysctl.d/*: Нет такого файла или каталога
[root@localhost woolf]# cat /usr/lib/sysctl.d/*
# Kernel sysctl configuration file
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# See sysctl.d(5) for the description of the files in this directory,
# and systemd-coredump(8) and core(5) for the explanation of the
# setting below.
kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# See sysctl.d(5) and core(5) for for details.
# System Request functionality of the kernel (SYNC)
kernel.sysrq = 16
# Append the PID to the core filename
kernel.core_uses_pid = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route = 0
# Promote secondary addresses when the primary address is removed
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
# Enable hard and soft link protection
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
fs.inotify.max_user_watches = 524288
# The kernel allocates aio memory on demand, and this number limits the
# number of parallel aio requests; the only drawback of a larger limit is
# that a malicious guest could issue parallel requests to cause the kernel
# to set aside memory. Set this number at least as large as
# 128 * (number of virtual disks on the host)
# Libvirt uses a default of 1M requests to allow 8k disks, with at most
# 64M of kernel memory if all disks hit an aio request at the same time.
fs.aio-max-nr = 1048576
[root@localhost woolf]# sysctl -a | grep vm.dirty_ratio
vm.dirty_ratio = 20
[root@localhost woolf]# sysctl vm.dirty_ratio=40
vm.dirty_ratio = 40
[root@localhost woolf]# sysctl -p
[root@localhost woolf]# sysctl -a | grep vm.dirty_ratio
vm.dirty_ratio = 40
[root@localhost woolf]#
---------- Добавлено 23.11.2014 в 01:04 ----------
Как мы видим, если параметра в конфиге нет, он в дефолт не скинется. Об этом Вам тут толкуют...
pupseg: и ничего ребутить не надо. В любой NIX-ОС перезагрузка требуется только в двух случаях: - замена оборудования - обновление\реконфигурирование ядра
Умиляют такие заявления. glibc не обновляем, да? В данном случае sysctl не вернет значения по дефолту, а вернет только те, что в дефолтном sysctl. странно, да?
Так же перезагрузка требуется при обновлении некоторых модулей ядра. В ядре есть пачка багов, из-за которых долгий аптайм невозможен во многих случаях. Например, не со всяким железом нормально отрабатывают suspend/hibernate, после высокой дисковой активности на некоторых конфигурациях с некоторыми ядрами возможно выпадение в корку некоторого софта... Описывать можно много и долго.
---------- Добавлено 22.11.2014 в 15:04 ----------
Romka_Kharkov: Не буду говорить что это супер-мега защита... но скажем так ... доп. винтик на общей броне
Гм. В sudoers разрешаем нужному юзеру выполнять эту команду. Собсна, даём возможность юзверю повышать привилегии до рута не давая от него пароль. Ну как-то так, да. Для этого оно используется довольно часто (ну не чтобы сторонним юзверям давать, а чтобы от рабочего юзера пароль не вписывать).
То есть роутер дайет такую же производительность, как и выделенный сервер? Мне даже уже не смешно... Да, железки от ASUS не плохи. Но вот только производительность такого сервера стремится к нулю при минимальной загрузке...
---------- Добавлено 24.11.2014 в 20:51 ----------
Кстати, как умудрились битрикс на ~20 соединений уложить в 8M RAM? ))). Фальсификаторы такие фальсификаторы...
Мы свой проект вообще на Drupal+Ubercart пилим :-D
ashton-lex, Так, походу, Вам вирус залили на сайты. И хостинг тут реально не виноват.
Могу панельку предложить, бесплатную и с поддержкой. Как разработчик. Только если там что-то сломается - чинить могу долго )
zpjekan, Если для экспериментов - поставьте на домашнем компутере VirtualBOX и не тратьте деньги. А если для дела - там еще кроме этого файла много где и чего прописано, можете не предусмотреть. То есть, я подозреваю, что Вам нужно не просто прописать виртуалхост, так что, скорее всего, ошибетесь.
zpjekan, Наймите кого-нибудь. Лучше будет.
ssh xx.xx.xx.xx -l root
yum install nano
nano /etc/httpd/conf/httpd.conf
Ctrl+c
y
exit
ну как-то так. Но я бы вам советовал воспользоваться советом жахнуть 50 грамм. Ибо набедокурите.
pupseg, файл вернет, а измененный конфиг ядра - нет.
Конфиги я не трогал. Дефолтные. Вот вывод с консоли:
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
[root@localhost woolf]# cat /etc/sysctl.d/*
vm.swappiness = 1
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
[root@localhost woolf]# cat /run/sysctl.d/*
cat: /run/sysctl.d/*: Нет такого файла или каталога
[root@localhost woolf]# cat /usr/lib/sysctl.d/*
# Kernel sysctl configuration file
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# See sysctl.d(5) for the description of the files in this directory,
# and systemd-coredump(8) and core(5) for the explanation of the
# setting below.
kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# See sysctl.d(5) and core(5) for for details.
# System Request functionality of the kernel (SYNC)
kernel.sysrq = 16
# Append the PID to the core filename
kernel.core_uses_pid = 1
# Source route verification
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route = 0
# Promote secondary addresses when the primary address is removed
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
# Enable hard and soft link protection
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
fs.inotify.max_user_watches = 524288
# The kernel allocates aio memory on demand, and this number limits the
# number of parallel aio requests; the only drawback of a larger limit is
# that a malicious guest could issue parallel requests to cause the kernel
# to set aside memory. Set this number at least as large as
# 128 * (number of virtual disks on the host)
# Libvirt uses a default of 1M requests to allow 8k disks, with at most
# 64M of kernel memory if all disks hit an aio request at the same time.
fs.aio-max-nr = 1048576
[root@localhost woolf]# sysctl -a | grep vm.dirty_ratio
vm.dirty_ratio = 20
[root@localhost woolf]# sysctl vm.dirty_ratio=40
vm.dirty_ratio = 40
[root@localhost woolf]# sysctl -p
[root@localhost woolf]# sysctl -a | grep vm.dirty_ratio
vm.dirty_ratio = 40
[root@localhost woolf]#
---------- Добавлено 23.11.2014 в 01:04 ----------
Как мы видим, если параметра в конфиге нет, он в дефолт не скинется. Об этом Вам тут толкуют...
Стер обидные слова от греха по дальше, ибо зря я.
и ничего ребутить не надо. В любой NIX-ОС перезагрузка требуется только в двух случаях:
- замена оборудования
- обновление\реконфигурирование ядра
Умиляют такие заявления. glibc не обновляем, да? В данном случае sysctl не вернет значения по дефолту, а вернет только те, что в дефолтном sysctl. странно, да?
Так же перезагрузка требуется при обновлении некоторых модулей ядра. В ядре есть пачка багов, из-за которых долгий аптайм невозможен во многих случаях. Например, не со всяким железом нормально отрабатывают suspend/hibernate, после высокой дисковой активности на некоторых конфигурациях с некоторыми ядрами возможно выпадение в корку некоторого софта... Описывать можно много и долго.
---------- Добавлено 22.11.2014 в 15:04 ----------
up 910 days, 6:33, 1 user, load average: 1.03, 1.00, 1.01
О. Вот этот сервер - полльзуетесь kexec или тупо забили на обновления?
Не проще саму CentOS обновить, скажем, до CentOS7?
Не буду говорить что это супер-мега защита... но скажем так ... доп. винтик на общей броне
Гм. В sudoers разрешаем нужному юзеру выполнять эту команду. Собсна, даём возможность юзверю повышать привилегии до рута не давая от него пароль. Ну как-то так, да. Для этого оно используется довольно часто (ну не чтобы сторонним юзверям давать, а чтобы от рабочего юзера пароль не вписывать).