Results 1 to 4 of 4
  1. #1

    Optimizing a dedicated server

    Hi,

    I have a dedicated server, Celeron 1.7 GHz with 512 MB of RAM and RedHat linux. I have PHP and MySQL installed with Turck MMCache and the Zend Optimizer, but was wondering what other ways I can optimize the server. I currently host vBulletin forums with fairly heavy traffic, and mainly need to get the most out of PHP and MySQL, but any and all optimizations you could recommend would be great.

    Thanks.

  2. #2
    Join Date
    Dec 2001
    Location
    Franklin, TN, USA
    Posts
    1,322
    You should have gotten a P4 for a server.

    Do you have MySQL 4?

    Try recompiling PHP with minimal modules.

    You don't need Zend unless your forum requries Zend Optimizer.
    Linux Problems Solved. | Built for the Hosting Industry
    Server Management. Node Management. Helpdesk Management.
    ( AcuNett, Est. 15 Years, RateLobby 5 Stars )

  3. #3
    Join Date
    Jan 2002
    Location
    Home, chair
    Posts
    723
    Tweak mysql config and apache config. Enable SQL query caching in mysql config, switch off keepalives and raise min and max server limits in apache.

  4. #4
    I know we should have gotten a better server, but we really have no choice at this point. We're using modernbill so zend is required. Here's the current setup:

    PHP 4.3.4
    Turck MMCache and Zend Optimizer installed
    Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.4 FrontPage/5.0.2.2634
    MySQL 4.0.18

    Code:
    00:17:40  up 5 days, 22:48,  1 user,  load average: 0.08, 0.15, 0.17
    110 processes: 109 sleeping, 1 running, 0 zombie, 0 stopped
    CPU states:   8.4% user   0.9% system   0.3% nice   0.0% iowait  90.3% idle
    Mem:   506816k av,  468100k used,   38716k free,       0k shrd,   29768k buff
           233092k active,             213340k inactive
    Swap: 1052216k av,   71896k used,  980320k free                  265400k cached
    
      PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
    29001 root      17   0  1196 1196   856 R     5.5  0.2   0:00   0 top
        1 root       8   0   472  444   424 S     0.0  0.0   0:04   0 init
        2 root       9   0     0    0     0 SW    0.0  0.0   0:00   0 keventd
        3 root      19  19     0    0     0 SWN   0.0  0.0   0:02   0 ksoftirqd_CPU0
        4 root       9   0     0    0     0 SW    0.0  0.0   0:12   0 kswapd
        5 root       9   0     0    0     0 SW    0.0  0.0   0:00   0 bdflush
        6 root       9   0     0    0     0 SW    0.0  0.0   0:00   0 kupdated
        7 root       9   0     0    0     0 SW    0.0  0.0   0:00   0 khubd
        8 root       9   0     0    0     0 SW    0.0  0.0   0:00   0 kjournald
      129 root       9   0     0    0     0 SW    0.0  0.0   0:01   0 kjournald
      130 root       9   0     0    0     0 SW    0.0  0.0   0:00   0 kjournald
      131 root       9   0     0    0     0 SW    0.0  0.0   0:01   0 kjournald
      132 root       9   0     0    0     0 SW    0.0  0.0   0:19   0 kjournald
      514 root       9   0   556  520   476 S     0.0  0.1   0:10   0 syslogd
      518 root       9   0   412  364   364 S     0.0  0.0   0:00   0 klogd
      581 root       9   0   484  424   424 S     0.0  0.0   0:00   0 acpid
      591 named      9   0  2224 2012  1536 S     0.0  0.3   0:07   0 named
      605 root       9   0  1280 1148  1064 S     0.0  0.2   0:18   0 sshd
      620 root       8   0   764  680   616 S     0.0  0.1   0:07   0 xinetd
      660 root       9   0  1416 1364  1224 S     0.0  0.2   0:00   0 antirelayd
      670 root       8   0  2688 1812  1428 S     0.0  0.3   0:10   0 chkservd
      683 mailnull   8   0  1784 1544  1464 S     0.0  0.3   0:01   0 exim
      687 mailnull   9   0  1752 1440  1440 S     0.0  0.2   0:00   0 exim
      691 root       9   0  1348 1292  1148 S     0.0  0.2   0:00   0 antirelayd
      709 root       8   0 21668 3680  2200 S     0.0  0.7   0:04   0 spamd
      718 root       8   0   588  552   508 S     0.0  0.1   0:00   0 crond
      734 root       0   0  4512 2384  2316 S     0.0  0.4 277:02   0 httpd
      812 root       9   0  1128  964   964 S     0.0  0.1   0:00   0 mysqld_safe
      848 mysql      9   0 51244  45M  4704 S     0.0  9.2  79:40   0 mysqld
      976 root      10   0  3164 1656  1484 S     0.0  0.3   0:08   0 cppop
     1026 root      19  19 10376 9180  3152 S N   0.0  1.8   2:21   0 cpanellogd
     1042 nobody     9   0  2024 1300  1300 S     0.0  0.2   0:00   0 entropychat
     1075 root       8   0  3972 1820  1404 S     0.0  0.3   0:03   0 cpsrvd
     1083 cpanel     9   0  1644 1220  1216 S     0.0  0.2   0:00   0 stunnel-4.04loc
    Code:
    [mysqld]
    set-variable=max_connections=500
    set-variable=key_buffer=16M
    set-variable=myisam_sort_buffer_size=64M
    set-variable=join_buffer=2M
    set-variable=record_buffer=2M
    set-variable=sort_buffer=4M
    set-variable=table_cache=1024
    set-variable=thread_cache_size=256
    set-variable=wait_timeout=600
    set-variable=connect_timeout=10
    set-variable=max_allowed_packet=16M
    set-variable=max_connect_errors=10
    set-variable=query_cache_type=1
    set-variable=query_cache_size=16M
    skip-locking
    
    [safe_mysqld]
    open_files_limit=8192
    
    [mysqldump]
    quick
    set-variable=max_allowed_packet=16M
    
    [myisamchk]
    set-variable=key_buffer=64M
    set-variable=sort_buffer=64M
    set-variable=read_buffer=16M
    set-variable=write_buffer=16M
    
    [mysqld]
    max_connections = 500
    key_buffer = 16M
    myisam_sort_buffer_size = 64M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    Code:
    +--------------------------+------------+
    | Variable_name            | Value      |
    +--------------------------+------------+
    | Aborted_clients          | 10         |
    | Aborted_connects         | 3430       |
    | Bytes_received           | 460079502  |
    | Bytes_sent               | 3123071148 |
    | Com_admin_commands       | 0          |
    | Com_alter_table          | 0          |
    | Com_analyze              | 0          |
    | Com_backup_table         | 0          |
    | Com_begin                | 0          |
    | Com_change_db            | 412450     |
    | Com_change_master        | 0          |
    | Com_check                | 0          |
    | Com_commit               | 0          |
    | Com_create_db            | 0          |
    | Com_create_function      | 0          |
    | Com_create_index         | 0          |
    | Com_create_table         | 0          |
    | Com_delete               | 6666       |
    | Com_delete_multi         | 0          |
    | Com_drop_db              | 0          |
    | Com_drop_function        | 0          |
    | Com_drop_index           | 0          |
    | Com_drop_table           | 0          |
    | Com_flush                | 0          |
    | Com_grant                | 0          |
    | Com_ha_close             | 0          |
    | Com_ha_open              | 0          |
    | Com_ha_read              | 0          |
    | Com_insert               | 52047      |
    | Com_insert_select        | 557        |
    | Com_kill                 | 0          |
    | Com_load                 | 0          |
    | Com_load_master_data     | 0          |
    | Com_load_master_table    | 0          |
    | Com_lock_tables          | 3642       |
    | Com_optimize             | 0          |
    | Com_purge                | 0          |
    | Com_rename_table         | 0          |
    | Com_repair               | 0          |
    | Com_replace              | 5975       |
    | Com_replace_select       | 0          |
    | Com_reset                | 0          |
    | Com_restore_table        | 0          |
    | Com_revoke               | 0          |
    | Com_rollback             | 2          |
    | Com_savepoint            | 0          |
    | Com_select               | 757550     |
    | Com_set_option           | 0          |
    | Com_show_binlog_events   | 0          |
    | Com_show_binlogs         | 0          |
    | Com_show_create          | 0          |
    | Com_show_databases       | 4          |
    | Com_show_fields          | 102        |
    | Com_show_grants          | 2          |
    | Com_show_keys            | 7          |
    | Com_show_logs            | 0          |
    | Com_show_master_status   | 0          |
    | Com_show_new_master      | 0          |
    | Com_show_open_tables     | 0          |
    | Com_show_processlist     | 0          |
    | Com_show_slave_hosts     | 0          |
    | Com_show_slave_status    | 0          |
    | Com_show_status          | 7          |
    | Com_show_innodb_status   | 0          |
    | Com_show_tables          | 96         |
    | Com_show_variables       | 3          |
    | Com_slave_start          | 0          |
    | Com_slave_stop           | 0          |
    | Com_truncate             | 0          |
    | Com_unlock_tables        | 3642       |
    | Com_update               | 322083     |
    | Connections              | 353019     |
    | Created_tmp_disk_tables  | 203        |
    | Created_tmp_tables       | 49267      |
    | Created_tmp_files        | 0          |
    | Delayed_insert_threads   | 1          |
    | Delayed_writes           | 13470      |
    | Delayed_errors           | 38         |
    | Flush_commands           | 1          |
    | Handler_commit           | 0          |
    | Handler_delete           | 24680      |
    | Handler_read_first       | 49394      |
    | Handler_read_key         | 82170239   |
    | Handler_read_next        | 312390799  |
    | Handler_read_prev        | 3342677    |
    | Handler_read_rnd         | 5016648    |
    | Handler_read_rnd_next    | 496192141  |
    | Handler_rollback         | 0          |
    | Handler_update           | 27276848   |
    | Handler_write            | 9998590    |
    | Key_blocks_used          | 15586      |
    | Key_read_requests        | 132970349  |
    | Key_reads                | 4000940    |
    | Key_write_requests       | 164859     |
    | Key_writes               | 138265     |
    | Max_used_connections     | 27         |
    | Not_flushed_key_blocks   | 0          |
    | Not_flushed_delayed_rows | 0          |
    | Open_tables              | 241        |
    | Open_files               | 409        |
    | Open_streams             | 0          |
    | Opened_tables            | 247        |
    | Questions                | 2876803    |
    | Qcache_queries_in_cache  | 6368       |
    | Qcache_inserts           | 757342     |
    | Qcache_hits              | 962495     |
    | Qcache_lowmem_prunes     | 0          |
    | Qcache_not_cached        | 203        |
    | Qcache_free_memory       | 15124192   |
    | Qcache_free_blocks       | 2734       |
    | Qcache_total_blocks      | 15789      |
    | Rpl_status               | NULL       |
    | Select_full_join         | 17         |
    | Select_full_range_join   | 7          |
    | Select_range             | 93975      |
    | Select_range_check       | 0          |
    | Select_scan              | 169961     |
    | Slave_open_temp_tables   | 0          |
    | Slave_running            | OFF        |
    | Slow_launch_threads      | 0          |
    | Slow_queries             | 22         |
    | Sort_merge_passes        | 0          |
    | Sort_range               | 67677      |
    | Sort_rows                | 6284220    |
    | Sort_scan                | 108235     |
    | Table_locks_immediate    | 1669210    |
    | Table_locks_waited       | 841        |
    | Threads_cached           | 25         |
    | Threads_created          | 28         |
    | Threads_connected        | 4          |
    | Threads_running          | 1          |
    | Uptime                   | 514173     |
    +--------------------------+------------+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •