• 11-10-2008, 12:40:16
    #1
    Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz
    2gb
    250 GB

    Apache 2.2.9
    PHP Version 5.2.6
    MySQL 5.0.67
    xcache kurulu

    15 dakika cookie timeout 500-600


    Şuan sitemde hiç bir sorun yok ama cs server kurmayı düşünüyorum bu yüzden bir optimizasyon yapabilirim.
    24k-30k hit

    my.cnf
    [mysqld]
    local-infile=0

    httpd.conf
    Alıntı
    #
    # This is the main Apache HTTP server configuration file. It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
    # In particular, see
    # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
    # for a discussion of each configuration directive.
    #
    # Do NOT simply read the instructions in here without understanding
    # what they do. They're here only as hints or reminders. If you are unsure
    # consult the online docs. You have been warned.

    ServerRoot "/etc/httpd"
    Listen 80

    #LoadModule dummy_module /usr/lib/apache/mod_dummy.so
    #LoadModule php5_module /usr/lib/apache/libphp5.so
    Include /etc/httpd/conf/extra/httpd-phpmodules.conf

    User apache
    Group apache

    ServerAdmin admin@localhost
    DocumentRoot "/var/www/html"

    <Directory /home/*>
    AllowOverride All
    Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
    <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
    </LimitExcept>
    </Directory>

    <Directory />
    Options All
    AllowOverride All
    </Directory>

    <Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    <IfModule mod_suphp.c>
    suPHP_Engine On
    suPHP_UserGroup webapps webapps
    </IfModule>
    </Directory>

    <IfModule dir_module>
    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
    </IfModule>

    <FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
    </FilesMatch>

    ErrorLog /var/log/httpd/error_log
    LogLevel warn

    <IfModule log_config_module>
    #replace %b with %O for more accurate logging
    <IfModule mod_logio.c>
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%O" bytes

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    CustomLog /var/log/httpd/access_log common
    </IfModule>

    <IfModule alias_module>
    # Include some DirectAdmin alias
    Include conf/extra/httpd-alias.conf
    </IfModule>

    <Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>

    DefaultType text/plain

    <IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-gzip .tgz
    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddHandler cgi-script .cgi
    AddHandler type-map var
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType video/x-ms-asf .avi
    AddType video/mpeg .mpg
    AddType video/mpeg .mpeg
    AddType video/quicktime .mov
    AddType video/x-ms-wmv .wmv
    </IfModule>

    #EnableMMAP off
    #EnableSendfile off

    ################################################## #####################################
    # Do not change anything in included files, because they are rewritten by DirectAdmin #
    ################################################## #####################################

    # This is needed for PHP
    Include conf/extra/httpd-php-handlers.conf

    # Server-pool management (MPM specific)
    Include conf/extra/httpd-mpm.conf

    # Multi-language error messages
    Include conf/extra/httpd-multilang-errordoc.conf

    # Fancy directory listings
    Include conf/extra/httpd-autoindex.conf

    # Language settings
    Include conf/extra/httpd-languages.conf

    # User home directories
    #Include conf/extra/httpd-userdir.conf

    # Real-time info on requests and configuration
    Include conf/extra/httpd-info.conf

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf

    # Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf

    # Distributed authoring and versioning (WebDAV)
    Include conf/extra/httpd-dav.conf

    # Various default settings
    Include conf/extra/httpd-default.conf

    # Secure (SSL/TLS) connections
    Include conf/extra/httpd-ssl.conf

    # Deflate module settings
    #Include conf/extra/httpd-deflate.conf

    # All the DirectAdmin vhosts
    Include conf/extra/directadmin-vhosts.conf

    # All suPHP directives
    Include conf/extra/httpd-suphp.conf

    # All the other includes needed by the custombuild script
    Include conf/extra/httpd-includes.conf

    ################################################## #####################################
    # End of included files that are rewritten by DirectAdmin #
    ################################################## #####################################

    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
  • 11-10-2008, 20:11:18
    #2
    Administrator
    httpd.conf /etc de olmaz

    Bu komutla conf un içine girebilir

    pico /etc/httpd/conf/httpd.conf

    Bununlada dosya içindekileri SSH ekranına yazdırabilirsiniz.

    cat /etc/httpd/conf/httpd.conf

    Optimasyon kafadan yapılabilen bir iş değildir o yüzden sistemin kullandıgı ve gereksinim duydugu olayları bilmemiz gerekir.

    Bu konuma bakabilirsiniz.

    https://www.r10.net/server-optimizasy...ml#post2582044
  • 25-12-2008, 21:38:27
    #3
    Sunucu özelliklerim

    intel q9300 8 gb ram centos 5 - vbulletin - xcache-vbseo kurulumu

    günlük hit:80k
    anlık:3500-1500

    ani server load yükselmeleri oluyor sitenin hızını düşürmüyor ama 30-40 vuruyor tekrar düşüyor

    my.cnf

    [mysqld]
    #skip-name-resolve
    safe-show-database
    #old_passwords
    back_log = 50
    max_connections = 1000
    key_buffer_size = 384M
    myisam_sort_buffer_size = 128M
    join_buffer_size = 8M
    read_buffer_size = 8M
    sort_buffer_size = 8M
    table_cache = 2048
    thread_cache_size = 20
    wait_timeout = 30
    connect_timeout = 20
    tmp_table_size = 256M
    max_heap_table_size = 256M
    max_allowed_packet = 64M
    net_buffer_length = 16384
    max_connect_errors = 100000
    thread_concurrency = 8
    concurrent_insert = 2
    table_lock_wait_timeout = 30
    read_rnd_buffer_size = 4M
    bulk_insert_buffer_size = 16M
    query_cache_limit = 8M
    query_cache_size = 256M
    query_cache_type = 1
    query_prealloc_size = 262144
    query_alloc_block_size = 65536
    transaction_alloc_block_size = 8192
    transaction_prealloc_size = 4096
    default-storage-engine = MyISAM
    max_write_lock_count = 16
    
    [mysqld_safe]
    nice = -10
    open_files_limit = 8192
    
    [mysqldump]
    quick
    httpd.conf
    Include "/usr/local/apache/conf/includes/pre_main_global.conf"
    Include "/usr/local/apache/conf/includes/pre_main_2.conf"
    
    RLimitMEM 25550272853
    RLimitCPU 140
    
    KeepAlive On
    MaxKeepAliveRequests 170
    KeepAliveTimeout 4
    UseCanonicalName Off
    AccessFileName .htaccess
    DefaultType text/plain
    HostnameLookups Off
    ErrorLog logs/error_log
    ServerTokens Full
    AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/local/apache/manual$1"
    
    LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
    ForceLanguagePriority Prefer
    
    Alias /icons/ /usr/local/apache/icons/
    
    
    ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
    
    
    <IfModule prefork.c>
        StartServers 5
        MinSpareServers 10
        MaxSpareServers 25
        MaxClients 256
        MaxRequestsPerChild 0
    mysql tuning çıktısı

    MySQL Version 5.0.67-community i686
    
    Uptime = 2 days 21 hrs 26 min 26 sec
    Avg. qps = 56
    Total Questions = 14041192
    Threads Connected = 5
    
    Server has been running for over 48hrs.
    It should be safe to follow these recommendations
    
    To find out more information on how each of these
    runtime variables effects performance visit:
    http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
    Visit http://www.mysql.com/products/enterprise/advisors.html
    for info about MySQL's Enterprise Monitoring and Advisory Service
    
    SLOW QUERIES
    The slow query log is NOT enabled.
    Current long_query_time = 10 sec.
    You have 234 out of 14041255 that take longer than 10 sec. to complete
    Your long_query_time may be too high, I typically set this under 5 sec.
    
    BINARY UPDATE LOG
    The binary update log is NOT enabled.
    You will not be able to do point in time recovery
    See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html
    
    WORKER THREADS
    Current thread_cache_size = 384
    Current threads_cached = 175
    Current threads_per_sec = 0
    Historic threads_per_sec = 0
    Your thread_cache_size is fine
    
    MAX CONNECTIONS
    Current max_connections = 1000
    Current threads_connected = 5
    Historic max_used_connections = 180
    The number of used connections is 18% of the configured maximum.
    Your max_connections variable seems to be fine.
    
    MEMORY USAGE
    Max Memory Ever Allocated : 5 G
    Configured Max Per-thread Buffers : 27 G
    Configured Max Global Buffers : 650 M
    Configured Max Memory Limit : 28 G
    Physical Memory : 7.61 G
    
    Max memory limit exceeds 90% of physical memory
    
    KEY BUFFER
    Current MyISAM index space = 111 M
    Current key_buffer_size = 384 M
    Key cache miss rate is 1 : 10416
    Key buffer fill ratio = 21.00 %
    Your key_buffer_size seems to be too high.
    Perhaps you can use these resources elsewhere
    
    QUERY CACHE
    Query cache is enabled
    Current query_cache_size = 256 M
    Current query_cache_used = 51 M
    Current query_cache_limit = 8 M
    Current Query cache Memory fill ratio = 20.19 %
    Current query_cache_min_res_unit = 4 K
    Your query_cache_size seems to be too high.
    Perhaps you can use these resources elsewhere
    MySQL won't cache query results that are larger than query_cache_limit in size
    
    SORT OPERATIONS
    Current sort_buffer_size = 8 M
    Current read_rnd_buffer_size = 4 M
    Sort buffer seems to be fine
    
    JOINS
    Current join_buffer_size = 8.00 M
    You have had 53 queries where a join could not use an index properly
    join_buffer_size >= 4 M
    This is not advised
    You should enable "log-queries-not-using-indexes"
    Then look for non indexed joins in the slow query log.
    
    OPEN FILES LIMIT
    Current open_files_limit = 17010 files
    The open_files_limit should typically be set to at least 2x-3x
    that of table_cache if you have heavy MyISAM usage.
    Your open_files_limit value seems to be fine
    
    TABLE CACHE
    Current table_cache value = 8000 tables
    You have a total of 385 tables
    You have 1155 open tables.
    The table_cache value seems to be fine
    
    TEMP TABLES
    Current max_heap_table_size = 256 M
    Current tmp_table_size = 256 M
    Of 89529 temp tables, 10% were created on disk
    Created disk tmp tables ratio seems fine
    
    TABLE SCANS
    Current read_buffer_size = 8 M
    Current table scan ratio = 356 : 1
    read_buffer_size seems to be fine
    
    TABLE LOCKING
    Current Lock Wait ratio = 1 : 87
    You may benefit from selective use of InnoDB.
    If you have long running SELECT's against MyISAM tables and perform
    frequent updates consider setting 'low_priority_updates=1'
  • 30-12-2008, 21:13:36
    #4
    bilgiler güncellendi yardımcı olabilecek varmı?