Ver um Único Post
Antigo 21-05-2010, 02:56 AM   #1 (permalink)
VslDream
Membro - Capitão
 
Avatar de VslDream
 
Registrado em: Mar 2009
Localização: Belo Horizonte - MG
Posts: 119
Agradeceu: 58
Agradecido 33 Vezes em 25 Posts
Achei Ruim:
Acharam ruim Vezes em Posts

Inventório de VslDream

Padrão [L2JServer]Cofiguração parar Melhor Desempenho.

Ola Galera,

Seguinte, já faz um bom tempo que eu sempre procuro algo melhor, ou ate mesmo uma config especifica para melhorar o desempenho de meu Server.

Vou tentar explicar tudo aqui, desde a configuração da maquina que eu uso, ate as configurações comuns do server.
Vale lembrar que eu já utilizei um tutorial que tem em varios lugares, de como fazer seu server L2J Suportar 1K de players online, e aquilo nunca funcionou comigo.

Meu server tem bastante Include no Java, portanto não sei a que ponto tudo que tenho possa pesar o server.
Mas vamos aos detalhes.

Eu uso L2JServer Interlude como base. E o que precisa ser incluido ou sistema, a maioria a gente mesmo cria, e tals.

As configurações do meu Dedicado são:
Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
Processador: Single Xeon Quad-Core X3330 2.66GHz
Memória: 4096 MB
HD: 320 GB 
Velocidade de Uplink: 100 mbit
Sistema Operacional: Windows 2003 Server Standard – 32 Bits
Configurações options.properties:
Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
# =================================================================
# Test server setting, shouldn't be touched for production game servers
# =================================================================

Debug = False
Assert = False
Developer = False
AcceptGeoeditorConn = False
# if true the server will be a test server (listed by testserver clients only)
TestServer = False

# =================================================================
# Additional server settings, not required, can be left with defaults
# =================================================================

# If next switch is set to true every newly created character will have access level 200.
EverybodyHasAdminRights = False

# Setting for serverList
# Displays [] in front of server name
ServerListBrackets = False
# Displays a clock next to the server name
ServerListClock = False
# If true, the server will be set as GM only
ServerGMOnly = False

# This is setting of experimental Client <--> Server Player coordinates synchronization,
#   0 - no synchronization at all
#   1 - parcial synchronization Client --> Server only * using this option it is difficult for players to bypass obstacles
#   2 - parcial synchronization Server --> Client only
#   3 - full synchronization Client <--> Server
#  -1 - Old system: will synchronize Z only
CoordSynchronize = 1

# Zone Setting
#   0 = Peace All the Time
#   1 = PVP During Siege for siege participants
#   2 = PVP All the Time
ZoneTown = 0

# Chat configuration
# Global Chat - ON (=region), OFF, GM, GLOBAL
GlobalChat = ON
# Trade Chat - ON (=global, might be good for small servers), OFF, GM, LIMITED (=region)
TradeChat = ON

# Player punishment for illegal acions
#   1 - broadcast warning to gms only
#   2 - kick player(default)
#   3 - kick & ban player
#   4 - jail player (define minutes of jail with param: 0 = infinite)
DefaultPunish = 4
DefaultPunishParam = 10

# Bypass exploit protection
BypassValidation = True

# Enforce gameguard for clients
#   GameGuardEnforce - enforces gameguard query on character login
#   GameGuardProhibitAction - don't allow player to perform trade, talk with npc
#     or move until gameguard reply is received.
GameGuardEnforce = True
GameGuardProhibitAction = True

# Allow delete chars after nnn days, 0 = feature disabled
DeleteCharAfterDays = 7


# =================================================================
# Server optimizations
# =================================================================
# === Flood Protector ===
# set the initial size of the flood protector (should equal ~player count)
FloodProtectorInitialSize = 50
# === Items on ground management ===
# Allow players to drop items on the ground
AllowDiscardItem = false
# delete from world dropped reward items after n seconds. 0 - disabled
AutoDestroyDroppedItemAfter = 180
# Time in secs after wich droped herb will be autodestroyed (default: 15 seconds)
AutoDestroyHerbTime = 15
# List of items that will not be destroyed (seperated by ",")
# NOTE: Make sure the lists do NOT CONTAIN trailing spaces or spaces between the numbers!
# items on this list will be protected regardless below options
ListOfProtectedItems = 57,5575,6673

# also delete from world misc. items dropped by players (all except equipable items)
# NOTE: work only if AutoDestroyDroppedItemAfter >0
DestroyPlayerDroppedItem = false
# Destroy also equipable items (armor, weapon, jewelry)
# NOTE: Work only if DestroyPlayerDroppedItem = true
DestroyEquipableItem = false

# save into DB droppped items for restoring after reboot
SaveDroppedItem = false
# Empty table after items are loaded into memory - safety setting
# if server crash before saving items, on next start old items will be restored 
# and players may already picked up some of them - so this will prevent duplicates
EmptyDroppedItemTableAfterLoad = false
# Time interval in minutes to save in DB items on ground, 0 to disable
# NOTE: If SaveDroppedItemInterval is disabled items will be saved into DB only at server shutdown
SaveDroppedItemInterval = 17
# delete all saved items form DB On next start
# NOTE: Work only if SaveDroppedItem = false
ClearDroppedItemTable = false
--------------------------------------------
# delete invalid quest from player
AutoDeleteInvalidQuestData = False
# setting false can improve server performance on high rate servers
PreciseDropCalculation = False
# allows creating multiple nonstackable items at one time 
MultipleItemDrop = false

# Forces full item inventory packet to be sent for any item change
# Note: This can increase network traffic 
ForceInventoryUpdate = False

# Set the html cache's lazy loading True or False
# (Load html's into cache only on first time requested)
LazyCache = True

# Maximum range mobs can randomly go from spawn point
MaxDriftRange = 10

# Minimum and maximum variable in seconds for npc animation delay.
# You must keep MinNPCAnimation <= MaxNPCAnimation.
# "0" is default value.
MinNPCAnimation = 10
MaxNPCAnimation = 20
MinMonsterAnimation = 5
MaxMonsterAnimation = 20


# Show "data/html/servnews.htm" when a character enters world.
ShowServerNews = True

# Show L2Monster level and aggro 
ShowNpcLevel = True

# Activate the position recorder
# valid 3D points will be recorded and written to data/universe.txt on shutdown
ActivatePositionRecorder = False


# =================================================================
# Additionnal features that can be enabled or disabled
# =================================================================
# If you are experiencing problems with Warehouse or Freight transactions,
# feel free to disable them here. (They are both enabled by default).
AllowWarehouse   = True
# Enable Warehouse Cache - if WH is not used will server clear memory used by this WH
WarehouseCache   = False
# How long Warehouse should be store in Memory
WarehouseCacheTime = 15
AllowFreight     = True
# If True player can try on weapon and armor in shop
# Each Item tried cost WearPrice adena
AllowWear        = True
WearDelay        = 10
WearPrice        = 10
# =============== Test features ===============
AllowLottery     = False
AllowRace        = False
AllowWater       = False
# Enable pet for rent(wyvern&strider) from pet managers
AllowRentPet     = False
# Allow fishing disabled until all code uploaded
AllowFishing     = True
#Allow boat
AllowBoat        = False
#Allow cursed weapons
AllowCursedWeapons = True
#Allow Manor
AllowManor	= True
#Allow WalkerNPC
AllowNpcWalkers = False


# Allow L2Walker client (Default False)
# Can be True, False, GM
AllowL2Walker      = False
L2WalkerRevision   = 552
# Ban account if account using l2walker and is not GM, AllowL2Walker = False
AutobanL2WalkerAcc = True
# Apply default punish if player buy items for zero adena
OnlyGMItemsFree = False

# =================================================================
# Logging features
# =================================================================
# Logging ChatWindow
LogChat = False
# Logging Item handling NOTE: This can be very space consuming if enabled for all items.
LogItems = False
# Log GM actions
GMAudit = True


# =================================================================
# Community board configuration
# =================================================================
# Type of the Community board
#  - Full = new Community Board ( /!\ Experimental)
#  - Old = old Community Bord
#  - off =  no community Board
CommunityType = off
BBSDefault = _bbshome
# show level of character to others in Community Board
ShowLevelOnCommunityBoard = False
ShowStatusOnCommunityBoard = True
NamePageSizeOnCommunityBoard = 50
NamePerRowOnCommunityBoard = 5


# =================================================================
# Threads configuration - Take care changing this
# =================================================================

ThreadPoolSizeEffects = 10
ThreadPoolSizeGeneral = 13

#Default 2
UrgentPacketThreadCoreSize = 2
#Default 4
GeneralPacketThreadCoreSize = 4
#Default 4
GeneralThreadCoreSize = 4

AiMaxThread = 6


# Thread pools execution priority
# default values are -1,0,1 (low/med/high pools)
ExecutorPriLow = -1
ExecutorPriMed = 0
ExecutorPriHigh = 1

#Packet LifeTime in miliseconds, 0 - disabled feature
PacketLifeTime = 0

#Grid options: Grids can now turn themselves on and off.  This also affects
#the loading and processing of all AI tasks and (in the future) geodata 
#within this grid.
#Turn on for a grid with a person in it is immediate, but it then turns on 
#the 8 neighboring grids based on the specified number of seconds.
#Turn off for self and neighbors occures after the specified number of 
#seconds have passed during which a grid has had no players in or in 
#any of its neighbors.
#The always on option allows to ignore all this and let all grids be active
#at all times
GridsAlwaysOn = True
GridNeighborTurnOnTime = 30
GridNeighborTurnOffTime = 300

# GeoData options: 
# 0 = GeoData and PathFinding OFF (default)
# 1 = GeoData used to check Line Of Sight (LOS) targetting and 
#     L2Playable movement. You need to download files for data/geodata folder.
#     Monsters can pass walls but not aggro through them.
# 2 = Full GeoData enabled, CURRENTLY FOR TESTING ONLY. Includes PathFinding
#     (requires also /data/pathnode files) and all character moves go
#     through geodata checks (if a mob passes a wall, pathing is wrong).
GeoData = 0

#[True]Loads GeoData buffer's content into physical memory.
#[False] Does not necessarily imply that the GeoData buffer's content is not resident in physical memory.
ForceGeodata = True
Configurações de Start GameServer:
Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
@echo off
title Game Server UFS
IF EXIST update\l2jserver.jar goto update
IF NOT EXIST update\l2jserver.jar goto start
:update
move /y "update\l2jserver.jar"
Echo Atualizou
Echo.
goto start
:start
echo Starting L2J Game Server.
echo.
REM -------------------------------------
REM Default parameters for a basic server.
java -Dfile.encoding=UTF-8 -Xmx1024m -cp bsf.jar;bsh-2.0b4.jar;commons-logging-1.1.jar;mmocore.jar;javolution.jar;c3p0-0.9.1.2.jar;mysql-connector-java-5.0.7-bin.jar;l2jserver.jar;jython.jar net.sf.l2j.gameserver.GameServer
REM
REM If you have a big server and lots of memory, you could experiment for example with
REM java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts
REM -------------------------------------
if ERRORLEVEL 2 goto restart
if ERRORLEVEL 1 goto error
goto end
:restart
echo.
echo Admin Restart ...
echo.
IF EXIST update\l2jserver.jar goto update
goto start
:error
echo.
echo Server terminated abnormaly
echo.
:end
echo.
echo server terminated
echo.
pause
Configurações do MySql arquivo My.ini:
Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory 
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup option 
# "--defaults-file". 
#
# To run run the server from the command line, execute this in a 
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# To install the server as a Windows service manually, execute this in a 
# command line shell, e.g.
# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQLXY
#
#
# Guildlines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]

port=3306

[mysql]

default-character-set=latin1


# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this 
# file.
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306


#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Arquivos de programas/MySQL/MySQL Server 5.1/"

#Path to the database root
datadir="C:/MySQL/Data/"

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=latin1

# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB

# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=160

# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=99M

# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=320

# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=103M


# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before.  This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8

#*** MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method.  This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_sort_buffer_size=167M

# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=155M

# Size of the buffer used for doing full table scans of MyISAM tables.
# Allocated per thread, if a full scan is needed.
read_buffer_size=64K
read_rnd_buffer_size=256K

# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
sort_buffer_size=256K


#*** INNODB Specific options ***
innodb_data_home_dir="C:/MySQL/"

# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb

# Additional memory pool that is used by InnoDB to store metadata
# information.  If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS.  As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=7M

# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1

# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=4M

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=300M

# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=60M

# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=10
Agora pelo amor de Deus galera.
Sé peço atenção aos meus posts, pois eu to sempre ajudando quem eu posso, e acompanhando o forum, e quase todos os Posts que eu Crio, são abandonadas, e quem sabe mesmo, quase nunca dá atenção.
Sei que tem DEVs competentes aqui no FORUM, e que tem server muito bem configurado nestes quesitos.

Desde já, muito obrigado a todos.
Vlws!

VslDream está offline   Responder com Citação
O seguinte membro ao lado disse Obrigado(a) a : VslDream por gostar deste Post :
erickzinho (21-05-2010)
Links Patrocinados
 

Search Engine Optimization by vBSEO 3.3.0