title: QNAP - MySQL server SLOW response time / PHP
body: <p>We are going to use our QNAP as a Web Dev server.</p>
  
  <p>We have the following:</p>
  
  <ol>
  <li>TS-EC1279U-RP (Quad Core Intel Xeon E3-1225 3.1GHz Processor with 4GB ram &amp; 12 HDDs in RAID 6)</li>
  <li>PHP Version 5.3.9</li>
  <li>MYSQL Server version: 5.1.36</li>
  </ol>
  
  <p>We have installed Drupal and Joomla, however the response time seems to be very slows. We are waiting about 5 - 6 seconds before we get a response. We have edited the my.cnf for my sql (see below)</p>
  
  <pre><code>[client]
  #password   = your_password
  port = 3306
  socket      = /tmp/mysql.sock
  
  # Here follows entries for some specific programs
  
  # The MySQL server
  [mysqld]
  port = 3306
  socket      = /tmp/mysql.sock
  skip-locking
  skip-networking
  skip-name-resolve
  
  max_connections=500
  key_buffer_size=384M
  max_allowed_packet=16M
  table_cache=256
  sort_buffer_size=2M
  read_buffer_size=2M
  join_buffer_size=2M
  
  thread_cache=256
  
  query_cache_type=1
  query_cache_limit=1M
  query_cache_size=32M
  
  [mysqldump]
  quick
  max_allowed_packet = 16M
  
  [mysql]
  no-auto-rehash
  # Remove the next comment character if you are not familiar with SQL
  #safe-updates
  
  [isamchk]
  key_buffer=128M
  sort_buffer_size=128M
  read_buffer=2M
  write_buffer=2M
  
  [myisamchk]
  key_buffer=128M
  sort_buffer_size=128M
  read_buffer=2M
  write_buffer=2M
  
  [mysqlhotcopy]
  interactive-timeout
  </code></pre>
  
  <p>However even with the change above recommended by different sites, the performance got better but just by a little.</p>
  
  <p>We had our test sites on the QNAP and a hosting company. The response on the hosting company's servers is much faster. I know they have better hardware however the CPU charts on the QNAP dont even go above 3%.</p>
  
  <p>Thank you</p>
  
  <p>Update:</p>
  
  <p>I have added the log-slow-queries. I have used the site for about 30 minutes: The results so far:</p>
  
  <pre><code>/usr/local/mysql/libexec/mysqld, Version: 5.1.36-log (Source distribution). started with:
  Tcp port: 3306  Unix socket: /tmp/mysql.sock
  Time                 Id Command    Argument
  /usr/local/mysql/libexec/mysqld, Version: 5.1.36-log (Source distribution). started with:
  Tcp port: 3306  Unix socket: /tmp/mysql.sock
  Time                 Id Command    Argument
  </code></pre>
  
  <p>There is not indication that there is a SQL query longer than 1 second what so ever. So I am not sure to be honest if it is the PHP.ini or my.cnf setting. </p>
  
  <p>Thanks</p>