PDA

View Full Version : Server Help


Jacobs
Thu 13th Jan '05, 6:41am
Hi,

I'm running vb for two day's now and i need a litle help:

Running on a 2 MBit line..

1. Decidated machine

2. Server specs:

cpu speed/type single or dual cpus): dual Xeon 2.8 ghz
how much memory installed: 2 GB ram
hard drive type/configuration: 36GB SCSI raid 1
linux distributor or windows version: Windows 2003 Server
apache/IIS version: IIS 6
PHP version: php 4.3.9
MySQL version: mysql 4.1.7

3. No

4. MySQL.com provides installer

5. It’s a windows server, no top stats availible

6. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf so post the contents inside of my.cnf (minus any passwords of course). If on Windows server if you don't have that file you need to log into telnet and as root user type +---------------------------------+------------------------------+
| Variable_name | Value |
+---------------------------------+------------------------------+
| back_log | 50 |
| basedir | S:\mysql\ |
| binlog_cache_size | 32768 |
| bulk_insert_buffer_size | 8388608 |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | S:\mysql\share\charsets/ |
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
| concurrent_insert | ON |
| connect_timeout | 5 |
| datadir | S:\mysql\Data\ |
| date_format | %Y-%m-%d |
| datetime_format | %Y-%m-%d %H:%i:%s |
| default_week_format | 0 |
| delay_key_write | ON |
| delayed_insert_limit | 100 |
| delayed_insert_timeout | 300 |
| delayed_queue_size | 1000 |
| expire_logs_days | 0 |
| flush | OFF |
| flush_time | 1800 |
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 4 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
| group_concat_max_len | 1024 |
| have_archive | NO |
| have_bdb | NO |
| have_compress | YES |
| have_crypt | NO |
| have_csv | NO |
| have_example_engine | NO |
| have_geometry | YES |
| have_innodb | YES |
| have_isam | NO |
| have_ndbcluster | NO |
| have_openssl | NO |
| have_query_cache | YES |
| have_raid | NO |
| have_rtree_keys | YES |
| have_symlink | YES |
| init_connect | |
| init_file | |
| init_slave | |
| innodb_additional_mem_pool_size | 6291456 |
| innodb_autoextend_increment | 8 |
| innodb_buffer_pool_awe_mem_mb | 0 |
| innodb_buffer_pool_size | 262144000 |
| innodb_data_file_path | ibdata1:10M:autoextend |
| innodb_data_home_dir | |
| innodb_fast_shutdown | ON |
| innodb_file_io_threads | 4 |
| innodb_file_per_table | OFF |
| innodb_locks_unsafe_for_binlog | OFF |
| innodb_flush_log_at_trx_commit | 1 |
| innodb_flush_method | |
| innodb_force_recovery | 0 |
| innodb_lock_wait_timeout | 50 |
| innodb_log_arch_dir | |
| innodb_log_archive | OFF |
| innodb_log_buffer_size | 3145728 |
| innodb_log_file_size | 52428800 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | .\ |
| innodb_max_dirty_pages_pct | 90 |
| innodb_table_locks | ON |
| innodb_max_purge_lag | 0 |
| innodb_mirrored_log_groups | 1 |
| innodb_open_files | 300 |
| innodb_thread_concurrency | 10 |
| interactive_timeout | 28800 |
| join_buffer_size | 131072 |
| key_buffer_size | 135266304 |
| key_cache_age_threshold | 300 |
| key_cache_block_size | 1024 |
| key_cache_division_limit | 100 |
| language | S:\mysql\share\english\ |
| large_files_support | ON |
| license | GPL |
| local_infile | ON |
| log | OFF |
| log_bin | OFF |
| log_error | .\webserver3.err |
| log_slave_updates | OFF |
| log_slow_queries | OFF |
| log_update | OFF |
| log_warnings | 1 |
| long_query_time | 10 |
| low_priority_updates | OFF |
| lower_case_file_system | OFF |
| lower_case_table_names | 1 |
| max_allowed_packet | 1048576 |
| max_binlog_cache_size | 4294967295 |
| max_binlog_size | 1073741824 |
| max_connect_errors | 10 |
| max_connections | 800 |
| max_delayed_threads | 20 |
| max_error_count | 64 |
| max_heap_table_size | 16777216 |
| max_insert_delayed_threads | 20 |
| max_join_size | 4294967295 |
| max_length_for_sort_data | 1024 |
| max_relay_log_size | 0 |
| max_seeks_for_key | 4294967295 |
| max_sort_length | 1024 |
| max_tmp_tables | 32 |
| max_user_connections | 0 |
| max_write_lock_count | 4294967295 |
| myisam_data_pointer_size | 4 |
| myisam_max_extra_sort_file_size | 107374182400 |
| myisam_max_sort_file_size | 107374182400 |
| myisam_recover_options | OFF |
| myisam_repair_threads | 1 |
| myisam_sort_buffer_size | 31457280 |
| named_pipe | OFF |
| net_buffer_length | 16384 |
| net_read_timeout | 30 |
| net_retry_count | 10 |
| net_write_timeout | 60 |
| new | OFF |
| old_passwords | OFF |
| open_files_limit | 2048 |
| pid_file | S:\mysql\Data\webserver3.pid |
| port | 3306 |
| preload_buffer_size | 32768 |
| protocol_version | 10 |
| query_alloc_block_size | 8192 |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 88080384 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 8192 |
| range_alloc_block_size | 2048 |
| read_buffer_size | 61440 |
| read_only | OFF |
| read_rnd_buffer_size | 258048 |
| relay_log_purge | ON |
| rpl_recovery_rank | 0 |
| secure_auth | OFF |
| shared_memory | OFF |
| shared_memory_base_name | MYSQL |
| server_id | 0 |
| skip_external_locking | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slave_net_timeout | 3600 |
| slow_launch_time | 2 |
| sort_buffer_size | 262136 |
| sql_mode | |
| storage_engine | InnoDB |
| sync_binlog | 0 |
| sync_frm | ON |
| system_time_zone | W. Europe Standard Time |
| table_cache | 619 |
| table_type | InnoDB |
| thread_cache_size | 38 |
| thread_stack | 196608 |
| time_format | %H:%i:%s |
| time_zone | SYSTEM |
| tmp_table_size | 31457280 |
| tmpdir | |
| transaction_alloc_block_size | 8192 |
| transaction_prealloc_size | 4096 |
| tx_isolation | REPEATABLE-READ |
| version | 4.1.7-nt |
| version_comment | Source distribution |
| version_compile_machine | i32 |
| version_compile_os | NT |
| wait_timeout | 28800 |
+---------------------------------+------------------------------+

7. your mysql extended-status output:

+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 10 |
| Aborted_connects | 13 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 1561725341 |
| Bytes_sent | 3455476861 |
| Com_admin_commands | 0 |
| Com_alter_db | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 376036 |
| Com_change_master | 0 |
| Com_check | 82 |
| Com_checksum | 0 |
| Com_commit | 1 |
| Com_create_db | 4 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 134 |
| Com_dealloc_sql | 0 |
| Com_delete | 30676 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 1 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 7 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 5 |
| Com_grant | 2 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 327136 |
| Com_insert_select | 10508 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 1 |
| Com_optimize | 82 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 0 |
| Com_purge_before_date | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 34045 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 2 |
| Com_revoke_all | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 1798733 |
| Com_set_option | 912 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_charsets | 312 |
| Com_show_collations | 312 |
| Com_show_column_types | 0 |
| Com_show_create_db | 32 |
| Com_show_create_table | 295 |
| Com_show_databases | 119 |
| Com_show_errors | 0 |
| Com_show_fields | 126 |
| Com_show_grants | 0 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 28 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_privileges | 0 |
| Com_show_processlist | 0 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 2 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 1047 |
| Com_show_variables | 313 |
| Com_show_warnings | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 1 |
| Com_update | 617006 |
| Com_update_multi | 0 |
| Connections | 376867 |
| Created_tmp_disk_tables | 86 |
| Created_tmp_files | 1469 |
| Created_tmp_tables | 81775 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 9300 |
| Handler_discover | 0 |
| Handler_read_first | 547836 |
| Handler_read_key | 36389669 |
| Handler_read_next | 14212808 |
| Handler_read_prev | 1270628 |
| Handler_read_rnd | 8912637 |
| Handler_read_rnd_next | 411232231 |
| Handler_rollback | 43 |
| Handler_update | 639750 |
| Handler_write | 8030837 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 114645 |
| Key_blocks_used | 3011 |
| Key_read_requests | 69192780 |
| Key_reads | 183569 |
| Key_write_requests | 1047925 |
| Key_writes | 955754 |
| Max_used_connections | 48 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 64 |
| Open_streams | 0 |
| Open_tables | 37 |
| Opened_tables | 9161 |
| Qcache_free_blocks | 5013 |
| Qcache_free_memory | 71694552 |
| Qcache_hits | 1806041 |
| Qcache_inserts | 1795337 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 3374 |
| Qcache_queries_in_cache | 8922 |
| Qcache_total_blocks | 23161 |
| Questions | 5380853 |
| Rpl_status | NULL |
| Select_full_join | 114 |
| Select_full_range_join | 0 |
| Select_range | 301321 |
| Select_range_check | 0 |
| Select_scan | 220530 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 5 |
| Sort_merge_passes | 716 |
| Sort_range | 343945 |
| Sort_rows | 20405575 |
| Sort_scan | 78723 |
| Table_locks_immediate | 5823575 |
| Table_locks_waited | 6755 |
| Threads_cached | 37 |
| Threads_connected | 1 |
| Threads_created | 84 |
| Threads_running | 1 |
| Uptime | 5947597 |
+--------------------------+------------+

8. movabletype

9.

Average users ???

Max Concurrent users 415

Cookie time out 900

10. create a file named phpinfo.php and place this code in it and post the url/link to it from your web site



http://212.123.241.69/phpinfo.php (http://212.123.241.69/phpinfo.php)


11. if you run Apache and you have your own dedicated server or access to your httpd.conf (apache configuration file) can you post the values you have set for the following :

N/A

12. what version of vB are you running ?

3.0.3

AWS
Thu 13th Jan '05, 9:40am
I would upgrade php to 4.3.10 right away. Then install mmcache. Attached is mmcache.dll that will run on Windows and is compatible with 4.3.10.
You need to post the contents of my.ini. It should be in the mysql dir or in C:\WINDOWS.
If it is still named my.cnf you can't open it because Windows thinks it is a speed dial config file so you have to rename it to my.ini. To do that open a command prompt and do this:
cd DRIVE:\where-ever-my.cnf-is
ren my.cnf my.ini
You can open it with wordpad.
To install mmcache create a dir somewhere in Inetpub called mmcache. Mine is C:\Inetpub\php\mmcache. Upload mmcache.dll to it. In that dir create create another dir called cache. You'll have C:\Inetpub\mmcache\cache. Again mine is C:\Inetpub\php\mmcache\cache.
Now open your php.ine file.
Look for the loadable extensions section.
Just at the end of it add this:

zend_extension_ts="C:\Inetpub\php\mmcache\mmcache.dll"
mmcache.shm_size="16"
mmcache.cache_dir="c:\Inetpub\php\mmcache\cache"
mmcache.enable="1"
mmcache.optimizer="1"
mmcache.check_mtime="1"
mmcache.debug="0"
mmcache.filter=""
mmcache.shm_max="0"
mmcache.shm_ttl="0"
mmcache.shm_prune_period="0"
mmcache.compress="1"

Change the above paths to refect where you created the dirs.
Upload mmcache.php anywhere you like that is viewable on your site. It is best to be in a pw protected area. This is used to clear the cache and also view the files that are in the cache.

Jacobs
Thu 13th Jan '05, 9:53am
# 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 4.1). 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 4.1\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQL41 --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQL41
#
#
# 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


# 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=S:/mysql/

#Path to the database root
datadir=S:/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

# 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=800

# 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=84M

# 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=1520

# 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=30M


# 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=38

#*** 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_max_extra_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=30M

# 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=129M

# 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 ***


# 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=6M

# 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=3M

# 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=250M

# 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=50M

# 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

Zachery
Thu 13th Jan '05, 10:01am
You might want to change your default storage Engine from INNODB to MySIAM

Jacobs
Thu 13th Jan '05, 10:03am
Ok i will. So all ik ok to run vb? What are the maximum number of users for my configuration? We're waiting for a line upgrade to 4 MBit but now the site is really slow....

Zachery
Thu 13th Jan '05, 10:05am
Well from what i've been reading INNODB tables tend to be larger, and run slower than MySIAM (which might be spelled wrong so double check it before you edit the config ;)) as where MySIAM tables tend to be much faster and abit smaller overall. The downside of MySIAM is no row level locking, but Erwin (he has a huge forum) says that the MySIAM are preforming better than the InnoDB were.

And if you already have the InnoDB tables you would need to change their type. or dump the database, change the config, and reimport it (i think that should change them all as well)

Jacobs
Thu 13th Jan '05, 10:13am
Thanks for your reply. I will test you sollution. Can you tell me what the max number of concurrten users could be for my configuration.

Zachery
Thu 13th Jan '05, 10:15am
I can't I am still in the learning process, thats where either AWS or George comes in, they both know their stuff :)

Jacobs
Thu 13th Jan '05, 10:23am
Thanks for your reply's....

Zachery
Thu 13th Jan '05, 10:31am
I do know what I am talking about for the most part ;) Just George and AWS do alot better job than me