Avatar billede dmg Nybegynder
03. juli 2014 - 21:58 Der er 6 kommentarer

Opgradering til ny server er slow vs gamle server

Hej Experts,

Har virkelig brug for hjaelp og jeg undskylder eftersom jeg er paa US keyboard.

Jeg har lavet et system i PHP og MySql som har koert i 5 aar meget stabilt.
Det var et krav fra IT afdelingen at serveren skulle koerer den nyeste version af Windows Server som nu er 2012.

Jeg har nu flyttet systemet over paa den nye server og alt ser ud til at virke.
Det uforventede problem er at den nye server med meget hurtigere hardware koerer meget langsomere en den gamle server? Og jeg forstoar det slet ikke.

Systemet laver rigtigt mange forbindelser fra web serveren til mysql serveren noer brugeren anvender systemet saa moaske er det noget med connection der skal increases. Men jeg ved ikke saa meget om den slags. Saa hoeber jeg kan faa noget hjaelp her.

Nedenunder kan du se den nye server hardware maessigt er meget hurtigere en den gamle og anvender ogsaa nyeste versioner af Windows Server, IIS, PHP og MySql.

Gamle server:
Windows 2007 Server Standard.
HP ProLiant DL380 Gen3
1GB ram.
2 Xeon processors
PHP Version 5.3.8
MySql Community Server 5.5.16
IIS Web Server 7.0


Nye Server
Windows 2012 Server Standard
HP Proliant DL380p Gen8
16 GB ram.
2 Xeon processors.
PHP Version 5.5.12
MySql Community Server 5.6.19
IIS Web Server 8.5
Avatar billede arne_v Ekspert
03. juli 2014 - 22:54 #1
Er der forskel paa MySQL config?

Hvordan er PHP integreret ind i IIS?
Avatar billede dmg Nybegynder
08. juli 2014 - 20:49 #2
Hej Arne_v,

Tak for dit hurtige svar og sorry for at komme tilbage lidt langsomt. Jeg starter igen paa arbejde idag og vil gi dig flere detaljer.

PHP er integreret via fast_cgi og jeg kan ikke finde nogen events i event viewer'en der gi'r nogen fejl.
Avatar billede dmg Nybegynder
09. juli 2014 - 05:08 #3
Hej Arne_v,

Jeg har sammenlignt begge my.ini filer fra Mysql og den nye version ser naesten identisk ud sammen med den gamle. Den gi'r de samme eller flere resources end den gamle. Saa det sku vaere OK...
Charecter-set paa den gamle var latin1 og den nye havde utf8. Jeg laeste at dette kunne ha performance problemer saa skiftede til latin1 men det gjorde ingen forskel.

Den nye version af mysql har nedenstoende extra linjer som ikke kan ses i den gamle. Dem har jeg listed nedenunder...
Tror du de kan tweakes?

***** Extra linjer i ny version af my.ini *****

# The increment size (in MB) for extending the size of an auto-extend InnoDB system tablespace file when it becomes full.
innodb_autoextend_increment=64

# The number of regions that the InnoDB buffer pool is divided into.
# For systems with buffer pools in the multi-gigabyte range, dividing the buffer pool into separate instances can improve concurrency,
# by reducing contention as different threads read and write to cached pages.
innodb_buffer_pool_instances=8

# Determines the number of threads that can enter InnoDB concurrently.
innodb_concurrency_tickets=5000

# Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before
# it can be moved to the new sublist.
innodb_old_blocks_time=1000

# It specifies the maximum number of .ibd files that MySQL can keep open at one time. The minimum value is 10.
innodb_open_files=300

# When this variable is enabled, InnoDB updates statistics during metadata statements.
innodb_stats_on_metadata=0

# When innodb_file_per_table is enabled (the default in 5.6.6 and higher), InnoDB stores the data and indexes for each newly created table
# in a separate .ibd file, rather than in the system tablespace.
innodb_file_per_table=1

# Use the following list of values: 0 for crc32, 1 for strict_crc32, 2 for innodb, 3 for strict_innodb, 4 for none, 5 for strict_none.
innodb_checksum_algorithm=0

# The number of outstanding connection requests MySQL can have.
# This option is useful when the main MySQL thread gets many connection requests in a very short time.
# It then takes some time (although very little) for the main thread to check the connection and start a new thread.
# The back_log value indicates how many requests can be stacked during this short time before MySQL momentarily
# stops answering new requests.
# You need to increase this only if you expect a large number of connections in a short period of time.
back_log=80

# If this is set to a nonzero value, all tables are closed every flush_time seconds to free up resources and
# synchronize unflushed data to disk.
# This option is best used only on systems with minimal resources.
flush_time=0

# The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use
# indexes and thus perform full table scans.
join_buffer_size=256K

# The maximum size of one packet or any generated or intermediate string, or any parameter sent by the
# mysql_stmt_send_long_data() C API function.
max_allowed_packet=4M

# If more than this many successive connection requests from a host are interrupted without a successful connection,
# the server blocks that host from performing further connections.
max_connect_errors=100

# Changes the number of file descriptors available to mysqld.
# You should try increasing the value of this option if mysqld gives you the error "Too many open files".
open_files_limit=4161

# Set the query cache type. 0 for OFF, 1 for ON and 2 for DEMAND.
query_cache_type=0

# If you see many sort_merge_passes per second in SHOW GLOBAL STATUS output, you can consider increasing the
# sort_buffer_size value to speed up ORDER BY or GROUP BY operations that cannot be improved with query optimization
# or improved indexing.
sort_buffer_size=256K

# The number of table definitions (from .frm files) that can be stored in the definition cache.
# If you use a large number of tables, you can create a large table definition cache to speed up opening of tables.
# The table definition cache takes less space and does not use file descriptors, unlike the normal table cache.
# The minimum and default values are both 400.
table_definition_cache=1400

# Specify the maximum size of a row-based binary log event, in bytes.
# Rows are grouped into events smaller than this size if possible. The value should be a multiple of 256.
binlog_row_event_max_size=8K

# If the value of this variable is greater than 0, a replication slave synchronizes its master.info file to disk.
# (using fdatasync()) after every sync_master_info events.
sync_master_info=10000

# If the value of this variable is greater than 0, the MySQL server synchronizes its relay log to disk.
# (using fdatasync()) after every sync_relay_log writes to the relay log.
sync_relay_log=10000

# If the value of this variable is greater than 0, a replication slave synchronizes its relay-log.info file to disk.
# (using fdatasync()) after every sync_relay_log_info transactions.
sync_relay_log_info=10000

skip-name-resolve

***** Extra linjer slut - ny version af my.ini *****

Med hensyn til PHP.
De to filer er ikke helt ens, men kan ikke finde noget der ser forkert ud.
Systemet jeg koerer er objekt orinteret og kalder en masse filer samt database forbindelser.

Jeg har lavet en speed test som ikke er objekt orinteret, men som bare forbinder til databasen og henter alle records.
Her er det den nye version der koerer hurtigst. Saa det maa vaere noget med forbindelser...?
Avatar billede dmg Nybegynder
24. juni 2015 - 02:13 #4
Hej arne_v,

Jeg fandt aldrig en loesning men smid et svar og mange tak for hjaelpen!
Avatar billede arne_v Ekspert
28. juni 2015 - 03:33 #5
Jeg har ikke bidraget med noget.
Avatar billede arne_v Ekspert
28. juni 2015 - 03:33 #6
Fik lige en tanke - der er vel ikke skiftet fra MyiSAM til InnoDB tabeller da der blev flyttet?
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester