Лаги. Тик проседает

Обсуждаем все, что относится к выделенным серверам *NIX (Unix, Linux) и Windows
Сообщение
Автор
yalamer
Нович0к
Нович0к
Сообщения: 29
Зарегистрирован: 04.12.2009
Благодарил (а): 10 раз
Поблагодарили: 6 раз
Контактная информация:

#1 Сообщение 19.01.2012, 20:54

Всем доброе время суток.

Может кто-нибудь подскажет причину проседания тика на серверах?

Имеется:
  • 4-х ядерный Intel(R) Xeon(TM) CPU 2.66GHz с HT
  • 14 Гб ОЗУ
  • канал 1Гб/с
  • CentOS 5.7
  • сервера СSS v34 не более чем по 16 слотов (5-8 шт.)
Проблема:
Тик проседает до неприличных значений вроде 13-25 (от желаемого 100).
Сервера привязаны к ядрам (спасибо taskset), загрузка процессора не превышает 70 %, памяти свободно 2-4 Гб, load поднимается максимум до 7.

Буду очень рад любому указананному направлению для поиска проблем, потому что свои идеи закончились.

Аватара пользователя
Dev
Майор
Майор
Сообщения: 601
Зарегистрирован: 07.05.2011
Откуда: Одесса
Благодарил (а): 5 раз
Поблагодарили: 48 раз
Контактная информация:

#2 Сообщение 19.01.2012, 22:51

Кроме игровых серверов, на этом железе еще что-нибудь установлено (веб-сервера и т.д.)?
Какая версия ядра?
Ядро стандартное?

Аватара пользователя
cuttep
Капитан
Капитан
Сообщения: 446
Зарегистрирован: 26.06.2010
Откуда: http://www.evoplay.ru
Поблагодарили: 1 раз
Контактная информация:

#3 Сообщение 20.01.2012, 06:35

xraider писал(а):load поднимается максимум до 7.
как раз вот из-за этого.. у меня 6 серверов по 24 слота забитых load 2.0

yalamer
Нович0к
Нович0к
Сообщения: 29
Зарегистрирован: 04.12.2009
Благодарил (а): 10 раз
Поблагодарили: 6 раз
Контактная информация:

#4 Сообщение 20.01.2012, 16:22

Dev_ua

Код: Выделить всё

cat /proc/version
Linux version 2.6.18-274.7.1.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Thu Oct 20 16:21:01 EDT 2011
 
Ядро стандартное. Есть еще Апач и по-мелочи, но если все лишние процессы остановлены - картина не меняется.
cuttep писал(а): как раз вот из-за этого.. у меня 6 серверов по 24 слота забитых load 2.0
Я могу ошибаться, но думал, что если load < = количеству ядер, то жить можно.

Аватара пользователя
Dev
Майор
Майор
Сообщения: 601
Зарегистрирован: 07.05.2011
Откуда: Одесса
Благодарил (а): 5 раз
Поблагодарили: 48 раз
Контактная информация:

#5 Сообщение 20.01.2012, 16:31

xraider
Вполне возможно, что проблемы из-за стандартного и к тому же очень старого ядра :)

yalamer
Нович0к
Нович0к
Сообщения: 29
Зарегистрирован: 04.12.2009
Благодарил (а): 10 раз
Поблагодарили: 6 раз
Контактная информация:

#6 Сообщение 20.01.2012, 16:38

Dev_ua писал(а): Вполне возможно, что проблемы из-за стандартного и к тому же очень старого ядра :)
Как же не хотелось-то пересобирать ядро. Сам я немного далековат от мира *nix. Какие-нибудь рекомендации по версии и "нестандартности :D" дадите? Кидание в меня ссылками с криком "rtfm!" тоже приветствуется =)

Аватара пользователя
Dev
Майор
Майор
Сообщения: 601
Зарегистрирован: 07.05.2011
Откуда: Одесса
Благодарил (а): 5 раз
Поблагодарили: 48 раз
Контактная информация:

#7 Сообщение 20.01.2012, 16:47

xraider писал(а):
Dev_ua писал(а): Вполне возможно, что проблемы из-за стандартного и к тому же очень старого ядра :)
Как же не хотелось-то пересобирать ядро. Сам я немного далековат от мира *nix. Какие-нибудь рекомендации по версии и "нестандартности :D" дадите? Кидание в меня ссылками с криком "rtfm!" тоже приветствуется =)
Не сильно знаком с CentOS :)
Хоть процесс пересборки ядра не сильно отличается от моего любимого Debian, но с этим вряд ли помогу, пока что:)

oblomkrs
Майор
Майор
Сообщения: 775
Зарегистрирован: 02.07.2011
Благодарил (а): 4 раза
Поблагодарили: 32 раза

#8 Сообщение 21.01.2012, 21:53

cuttep спец по этим вещам.Пиши ему в личку.Он шарит в этом
Качественный хостинг OPTIBIT в Красноярске
NOVOSIBIRSK-CSS.RU|Only DUST2[NSK] ip:46.38.63.119:27015
NOVOSIBIRSK-CSS.RU|Only $2000$+AWP LEGO[NSK] ip:46.38.63.119:27016

Аватара пользователя
cuttep
Капитан
Капитан
Сообщения: 446
Зарегистрирован: 26.06.2010
Откуда: http://www.evoplay.ru
Поблагодарили: 1 раз
Контактная информация:

#9 Сообщение 22.01.2012, 15:07

xraider писал(а): Я могу ошибаться, но думал, что если load < = количеству ядер, то жить можно.
у тебя 4 ядра = 4.0, HT = +30%, 5,2 а у тебя 7.0
Dev_ua писал(а):
xraider писал(а):
Dev_ua писал(а): Вполне возможно, что проблемы из-за стандартного и к тому же очень старого ядра :)
Как же не хотелось-то пересобирать ядро. Сам я немного далековат от мира *nix. Какие-нибудь рекомендации по версии и "нестандартности :D" дадите? Кидание в меня ссылками с криком "rtfm!" тоже приветствуется =)
Не сильно знаком с CentOS :)
Хоть процесс пересборки ядра не сильно отличается от моего любимого Debian, но с этим вряд ли помогу, пока что:)
ни чем не отличается от гнома, ядра и патчи одни и те же.

yalamer
Нович0к
Нович0к
Сообщения: 29
Зарегистрирован: 04.12.2009
Благодарил (а): 10 раз
Поблагодарили: 6 раз
Контактная информация:

#10 Сообщение 24.01.2012, 16:30

cuttep писал(а):
xraider писал(а): Я могу ошибаться, но думал, что если load < = количеству ядер, то жить можно.
у тебя 4 ядра = 4.0, HT = +30%, 5,2 а у тебя 7.0
Спасибо, ценная информация, я как-то и не подумал сразу.
Привязывать сервер к "HT" - явно не лучшее решение?

При более детальном разборе выяснилось следующее: даже запущенный один сервер, привязанный к ядру (к физическому ядру, физического процессора= ) ) при кол-ве игроков более 8 уже не держит тик 100. Где копать?
server.cfg
hostname "Server"


// Define your RCon(Remote Console) password, this is mostly used for match servers.
// I'll recommend you to set one, incase you suddenly needs it.
// Default: Just don't make it easy to quess! Use big and small letters and numbers!
// Look at the example I've set for this one. No one will quess that, only 1 out of ten billion times.
// Defualt: None.
rcon_password "rcon"


// Define your server password, so only people who knows it can connect.
// Default: None.
sv_password ""


// Define your maxsize for a map(sounds, materials and models are included too)
// if your map exceeds the CVAR limit, will your map NOT be downloaded from your server.
// The number defined is the maximum amount of MB a client is allowed to download, for a single file.
// Default: 16
net_maxfilesize "50"


// Define your website for FastDownload.
// Default: None.
sv_downloadurl ""


// Allow clients to upload their custom decals to the server.
// Note this will disable clients being able to upload sprays.
// Default: 1
sv_allowupload 1


// Allow clients to downnload files.
// Default: 1
sv_allowdownload 1


// Define your servers max Frame Per Second(FPS).
// To recieve 1000FPS on Windows, try to use "fps_max 0" or a FPS booster.
// Default: ?
fps_max 300

// This controls your server framerate.
// Setting this to a lower value will make your server go in slowmotion.
// Default: 0
host_framerate 0


// Amount of time in seconds a player can spray their decal.
// Default: 10
decalfrequency 60


// If this CVAR is 0, both Internet and LAN players will be able to join.
// If this CVAR is 1, ONLY LAN PLAYERS ON YOUR OWN NETWORK WILL BE ABLE TO JOIN NOMATTER IF YOU HAVE DONE PORTFORWARING!
// Default: 0
sv_lan 0


// This will define your location in the world, if somebody as Europe ONLY in their filtes and you have USA - then wouldn't be able to find your server.
// Default: 255
// 0 - Us Eastcoast.
// 1 - US Westcoast.
// 2 - South America.
// 3 - Europe.
// 4 - Asia.
// 5 - Australia.
// 6 - Middle East.
// 7 - Africa.
// 255 - World
sv_region 255


// This could be your own email or another email who do business within this server.
// Default: None.
sv_contact http://forums.com


// This will make doors open faster, especially the door in de_nuke
// Default: 0.5
phys_timescale 1.0

//*************************************************************************\\
//* *\\
//* *\\
//* Brandwidth Rates *\\
//* *\\
//* *\\
//*************************************************************************\\

// Maximum allowed brandwidth on your server.
// Default: 0 (unlimited)
sv_maxrate 30000


// Minimum allowed brandwidth on your server.
// Default: 0 (unlimited)
sv_minrate 15000


// Maximum updates per second as the server will allow.
// Default: 66
sv_maxupdaterate 100


// Minimum updates per second as the server will allow.
// Default: 10
sv_minupdaterate 33


// This controls your cleints maximum cmdrate.
// Do the same with this one as sv_maxupdaterate.
// Default: 40
sv_maxcmdrate 100


// This controls your cleints minimum cmdrate.
// Do the same with this one like: sv_minupdaterate
// Default: 0
sv_mincmdrate 33


//*************************************************************************\\
//* *\\
//* *\\
//* Game Settings *\\
//* *\\
//* *\\
//*************************************************************************\\

// This defines when to change map, if a player reached the fraglimit.
// Default: 0
mp_fraglimit 0


// This defines when to change map, if both teams has the totalt of the CVAR.
// Default: 0
mp_maxrounds 0


// This defines when to change map, if one of the teams wins the specified number.
// Default: 0
mp_winlimit 0

// This defines when to change map, when the entered time is reached.
// Default: 0
// Note: 0 = Unlimited.
mp_timelimit 25


// This controls everybodys start moneys, if they reconnect they'll have the amount as you had set.
// Or if the mp_restartgame 1 command is performed, you'll get the x amount of moneys.
// Default: 800 (Maximum 16000)
mp_startmoney 800


// This defines how long time per round, untill one of the teams is eliminated or if the bomb detonated/defused
// Default: 5.
// Note: 1.75 = 1 minute and 45 secs.
mp_roundtime 1.75


// Disables the autoaim function.
// Default: 0
mp_autocrosshair 0


// This defines how long time you will be able to buy new weapons in the current round.
// Default: 0.5
mp_buytime 0.5


// This defines how long time from the bomb is plated to the explosion of the bomb.
// Default: 45
mp_c4timer 30


// If you falls down and this one is set to '1' you'll lose damage, if not set to '1' you wouldn't lose damage.
// Default: 0
mp_falldamage 1


// This allows your cleints to use their flashlight if set to '1'
// Default: 0
mp_flashlight 1


// Those difenes if you'll be able to hear footsteps, I prefer you ALLWAYS have those set to '1'
// Default: 1 (Both)
sv_footsteps 1
mp_footsteps 1


// This defines how long time you'll have to wait in spawn before you can shoot and run.(And buy weapons, in wars set it high)
// Default: 6
mp_freezetime 7


// This defines if you can kill your own teammates, also known as "TA/TK", if its set to '1' you can kill your own mates.
// TA = Team-Attack
// TK = Team-Kill
// Default: 0
mp_friendlyfire 0


// If "mp_friendlyfire" is set to 1 and some one kills their own mate, will they do suicide in the comming round.
// Default: 0
mp_tkpunish 0


// Time in seconds to Kick players who team-kill after round restart
// Default: 5
mp_spawnprotectiontime 0


// Toggles monetry fines from killing a hostage.
// How many hostages a Terrorist can kill before being kicked, 0 to disable.
// Default: 13
mp_hostagepenalty 4


// Controls the teams doesn't get unfair, by limiting the different on both teams.
// Example: If the Terroists have 15 players and the Counter Terroists have 13, then you'll only be able to join Counter Terroists.
// Default: 2
mp_limitteams 2


// Controls what information player see in the status bar:
// 0 all names
// 1 team names
// 2 no names.
// Default: 0
mp_playerid 0


//*************************************************************************\\
//* *\\
//* *\\
//* Log Settings *\\
//* *\\
//* *\\
//*************************************************************************\\

// Defines if logs is enabled or disabled
// On = Enabled.
// Off = Disabled.
// Default: on
log off


// Toggels if the logged text have to be in one single file.
// Default: 0
sv_log_onefile 0


// If this CVAR is set to '1' then i will safe the log files in the srcds/logs directory.
// Default: 1
sv_logfile 1


// Defines if it has to log bans.
// Default: 0
sv_logbans 1


// Defines if it has to log the echo in the MAIN console.
// Default: 1
sv_logecho 1


// Chose the log details.
// Default: 0
mp_logdetail 3





//*************************************************************************\\
//* *\\
//* *\\
//* AVANCED RCON *\\
//* *\\
//* *\\
//*************************************************************************\\

// Defines how long time a ban will be if someone fails RCON authentication.
// Default: 0 (0 = Permanent)
sv_rcon_banpenalty 15


// Max number of times a user can fail RCON authentication before being banned.
// Default: 10
sv_rcon_maxfailures 3


// Number of times a user can fail RCON authentication before being banned.
// Default: 5
sv_rcon_minfailures 1


// Number of seconds to track failed RCON authentications.
// Default: 30
sv_rcon_minfailuretime 30


// Defines if the RCON has to be logged.
// Default: 1
sv_rcon_log 1


//*************************************************************************\\
//* *\\
//* *\\
//* SourceTV *\\
//* *\\
//* *\\
//*************************************************************************\\

// Define if the SourceTV should be activated.
// 1 = The TV will be activated, and will join spectator on next map as a bot.
// Default: 0
tv_enable 0


// Connects a relay server to another SourceTV server/proxy
// Default: none
// Example: tv_relay <SourceTV IP:SourceTV port>
// Note: Remove the slashes infront of the command before use.
//tv_relay


// Give the TV a name.
// Default: SourceTV
tv_name SrcTV @ 27020


// Change the port of the TV.
// You can set this port at any port, just not the same as the main server is running on!(27015, is standard)
// Default: 27020
tv_port 27020


// Sets the maximum bandwidth spend per client in bytes/second.
// How highter the value is, how more smooth will the SourceTV run.
// Beware, it will increase the brandwidth and CPU usage dramatically.
// Default: 5000
tv_maxrate 5000


// Set a password for the TV, just as "sv_password" for the server.
// Default: none.
tv_password ""


// Sets a required password for relay proxies.
// Default: none.
tv_relaypassword ""


// Sets maximum client number for local SourceTV server/proxy.
// How more slots on, how more cleints will be able to connect to it and that will increase your brandwidth/CPU usage!
// default: 128
tv_maxclients 20


// Sets a SourceTV broadcast title shown in the spectator GUI.
// Default: SourecTV
tv_title tv


// Disables other spectators chat lines (client only).
// Default: 0
tv_nochat 0


// Automatically records every game, demo file name format is auto-YYYYMMDD-hhmm-map.dem.
// The file will be safed in: "srcds/cstrike".
// This is recommended with much use of your server, so you won't miss your importan kills.
tv_autorecord 0


//*************************************************************************\\
//* *\\
//* *\\
//* Bots *\\
//* *\\
//* *\\
//*************************************************************************\\

// Amount of bots to add.
// How more bots you add, how more CPU your server will use. Start by adding a few!
// Default: 0
bot_quota 0


// If 'Fill', the server will adjust bots to keep # players in the game.
// Where # is bot_quota (from above)
// Default: 0
bot_quota_mode normal


// This will adjust the difficulty of the bots.
// 0 = easy.
// 1 = normal.
// 2 = hard.
// 3 = expert.
// Default: easy (1)
bot_difficulty 1


// This controls what to be infront of the bot name.
// Prefix for bot names. A prefix is a tag that bots will have in front of their name.
// You can enter your clan tag or leave blank.
// Default: There's no prefix for default. Just standard bot names.
bot_prefix [WWW.SRCDS.COM]


// Allows the bots how much they may talk. Here's the available values for this setting.
// Off = If this value is set, the bots will not use the microphone speak option!
// Minimal = If this value is set, the bots will speak at minimal necessity.
// Radio = If this value is set, the bots will only use the radio commands to talk with(The "Gogogo!" commands).
// Normal = If this value is set, the bots will just speak quite normal when there's an action happening.
// We'll just set it this to off.
// Default: Normal
bot_chatter off


// If a bots cash amount falls below this($1750), the bot will not buy any weapons. Untill it has above the limit.
// Default: $2000
bot_eco_limit 1750


//*************************************************************************\\
//* *\\
//* *\\
//* Performance, Spectator, Physics and other CVARS *\\
//* *\\
//* *\\
//*************************************************************************\\

// Defines if the gravity has to be low or high, if its high you will not be able to jump.
// And how lower the value is, how higther you will rice into the air.
// Default: 800
sv_gravity 800

// Defines the friction.
// Default: 4
sv_friction 4


// Kicking idle or team-killing players.
// Default: 1
mp_autokick 0


// This controls how a dead client would be able to view the rest of the round.
// 0 = Free look both CT & T.
// 1 = Only the players OWN team can be spectated.
// Default: 0
mp_forcecamera 0


// Force clients to auto-join the opposite team if they are not balanced
// Default: 1
mp_autoteambalance 0


// Defines if both Terroists and Counter Terroist can talk together(Will sometimes make ALOT of noice, and slow down your server)
// Default: 0
sv_alltalk 1


// If this one is enabled teammates can talk with hetogether in-game.
// Default: 1 (Not recommanded when using big servers)
sv_voiceenable 1


// If this one is set to '1' EVERYBODY will be able the pause the server(Not recommanded!)
// Default: 0
sv_pausable 0


// Forces all cleints to pass consistency check for custom skins, sounds and maps.
// If you have those, you'll be FORCED to use standard!
// Default: 0
sv_consistency 0


// This controls if the players can use lawfully cheats, but is limited.
// WARNING: Setting this 1 would allow people to hack your server and use several server exploits.
// Commands for cheats:
// noclip - Makes you fly around and can't take damage.
// r_drawothermodels 2 - Gives a weird wireframe screen of everything through walls. (Set to 1 for normal game play)
// mat_wireframe 1/2/3 - Gives you a much worse effect of wireframe. (0 = Standard game play)
// Default: 0
sv_cheats 0


// The max speed a player can move with.
// Default: 320
sv_maxspeed 320


// Allows cleints to go be a Specator.
// Default: 1
mp_allowspectators 1


// When you reach the last round and everybody is dead, there be an amount of seconds before loading a new map.
// Lower value = Faster map load.
// Default: 10
mp_chattime 10


// After this many seconds without a message from a client, the client is dropped.
// Default: 65
sv_timeout 60


// Set this one high, if you're running surf maps.
// Default: 10
sv_airaccelerate 10


// The max speed a player can move with when they are holding down [SHIFT]
// Default: 75
sv_stopspeed 75


// The stepsize your cleints can take.
// Default: 18
sv_stepsize 18
run.sh
./srcds_run -port 27015 +ip 1.2.3.4 +maxplayers 16 -tickrate 100 +map de_dust2 +mp_dynamicpricing 0 -nohltv

Аватара пользователя
Dev
Майор
Майор
Сообщения: 601
Зарегистрирован: 07.05.2011
Откуда: Одесса
Благодарил (а): 5 раз
Поблагодарили: 48 раз
Контактная информация:

#11 Сообщение 24.01.2012, 16:40

xraider писал(а):Привязывать сервер к "HT" - явно не лучшее решение?
Как-раз я и cuttep - привязываем сервера к потокам ядра :)

Аватара пользователя
cuttep
Капитан
Капитан
Сообщения: 446
Зарегистрирован: 26.06.2010
Откуда: http://www.evoplay.ru
Поблагодарили: 1 раз
Контактная информация:

#12 Сообщение 25.01.2012, 06:29

xraider писал(а): Спасибо, ценная информация, я как-то и не подумал сразу.
Привязывать сервер к "HT" - явно не лучшее решение?
с НТ есть прирост 20-30%, поэтому есть смысл.
xraider писал(а): При более детальном разборе выяснилось следующее: даже запущенный один сервер, привязанный к ядру (к физическому ядру, физического процессора= ) ) при кол-ве игроков более 8 уже не держит тик 100. Где копать?
я бы начал с Центоса, пересборки ядра и тд

yalamer
Нович0к
Нович0к
Сообщения: 29
Зарегистрирован: 04.12.2009
Благодарил (а): 10 раз
Поблагодарили: 6 раз
Контактная информация:

#13 Сообщение 25.01.2012, 17:11

С потоками я немного не понял такого момента: скажем есть процессор с двумя ядрами, включенным HT, т.е. можно привязать сервер с помощью taskset к одному из четырех потоков 0-4 (или я уже тут чушь говорю?). Сервера, привязанные к потоком одного ядра будут "мешать" другу другу? И есть ли смысл привязать не к одному, потоку сервер, а к двум (трем, четырем...)

И пока писал, всплыл еще такой вопрос: srcds времен 34-ой версии не поддерживает мультипоточность, а последние v69 - уже поддерживают?
cuttep писал(а):
я бы начал с Центоса, пересборки ядра и тд
Посовещавшись, решили установить Debian и копаться уже там. Да и сообщество вроде отзывчивей = )

LEII4A
Лейтенант
Лейтенант
Сообщения: 213
Зарегистрирован: 22.08.2009
Откуда: оттуда
Благодарил (а): 1 раз

#14 Сообщение 25.01.2012, 18:53

xraider писал(а):И пока писал, всплыл еще такой вопрос: srcds времен 34-ой версии не поддерживает мультипоточность, а последние v69 - уже поддерживают?
угу

kadet89
Майор
Майор
Сообщения: 557
Зарегистрирован: 26.12.2006

#15 Сообщение 26.01.2012, 19:21

У меня лично грузит оба ядра, почти равномерно, но не более чем на 60% каждое и не более 100% в сумме (а максимум для двухядерного соответственно 200%). Даже когда фпс на сервере падает до 2-5 кадров в секунду и всё ужасно лагает, полностью проц не нагружается никогда.

Ответить Вложения 1