Optimize QNAP QTS for ZurmoCRM


It’s not easy to install ZurmoCRM and that’s why I encourage to Test your ZurmoCRM with VirtualBox. You need to manually edit configuration files before setup on QNAP QTS.

This post will be updated when I found more optimization in the future.

QTS 4.0

There is no support for Alternative PHP Cache and Memcache.

  1. Increase DEF_MEMORY_LIMIT which is the default value for memory_limit in Qthttpd.sh to 256.
  2. Increase post_max_size in php.ini to 20M.
  3. Increase upload_max_filesize in php.ini to 20M.
  4. Increase max_execution_time in php.ini to 2000.

Compiler your Alternative PHP Cache and Memcahe

The build-in PHP accelerator is eAccelerator. You need to compile Alternative PHP Cache manually.

Don’t follow the thread APC (Alternative PHP Cache) extension for PHP? on QNAP forum to build your apc.so. It works for PHP 5.2.17-2 but is not compatible with the build-in PHP 5.3.26.

You need to setup development environment on desktop computer and use Toolchains for Intel x86 and Marvell ARM from QNAP to compile from scratch. It is not an easy job. I am trying to make it work and will create another post to explain.

memcached is available as a package on QNAP App Center (QPKG) and need to launch manually. It won’t work until you compile and enable Memcache or Memcached for build-in PHP.

Therefore, no compile, no accelerators. Skip the following two sections until you compile successfully or get them somewhere else.

Enable Alternative PHP Cache after Installation

It is default on. There is no need to change after you enable Alternative PHP Cache.

If you are not comfortable with the performance, check the [where you installed ZurmoCRM]/app/protected/config/debug.php file and look for $phpLevelCaching. It should be true by default.

Unless you need to disable Alternative PHP Cache during debug, please keep it true.

Enable Memcahe after Installation

Edit the [where you installed ZurmoCRM]/app/protected/config/perInstance.php file and fill in memcached information. It should match to parameters to launch memcached.

$memcacheServers  = array( // An empty array means memcache is not used.
                        array(
                            'host'   => '127.0.0.1',
                            'port'   => 11211,  // This is the default memcached port.
                            'weight' => 100,
                        ),
                    );

Edit the [where you installed ZurmoCRM]/app/protected/config/debug.php file and change $memcacheLevelCaching to true to enable.

Notes

  1. Size for apc.shm_size and memcached may vary depends on systems environments and usage scenario.
  2. If you use less than 900 in max_execution_time, you might fail to install demo data. You may set it to a smaller number than 2000 after installation.
  3. If you are looking for files, please read QNAP QTS Configuration and Executable Files.

Reference

  1. eAccelerator
  2. memcached
  3. Oracle: Docs: 15.6.2 Using memcached
  4. PHP
  5. PHP: Alternative PHP Cache
  6. PHP: PHP Manual: Appendices: php.ini directives
  7. PHP: PHP Manual: Appendices: php.ini directives: max_execution_time
  8. PHP: PHP Manual: Appendices: php.ini directives: memory_limit
  9. PHP: PHP Manual: Appendices: php.ini directives: post_max_size
  10. PHP: PHP Manual: Appendices: php.ini directives: upload_max_filesize
  11. PHP: PHP Manual: Function Reference: Affecting PHP’s Behavior: APC: Installing/Configuring: Runtime Configuration
  12. PHP: PHP Manual: Function Reference: Affecting PHP’s Behavior: APC: Installing/Configuring: Runtime Configuration: apc.shm_size
  13. PHP: PHP Manual: Function Reference: Date and Time Related Extensions: Date/Time: Installing/Configuring: Runtime Configuration: date.timezone
  14. PHP: PHP Manual: Function Reference: Other Services: Memcache
  15. PHP: PHP Manual: Function Reference: Other Services: Memcached
  16. QNAP Forum: APC (Alternative PHP Cache) extension for PHP?
  17. QNAP QTS Configuration and Executable Files
  18. QNAP: Developer Center: Toolchains for Intel x86 and Marvell ARM
  19. QNAP: App Center (QPKG)
  20. QNAP: QTS
  21. Test your ZurmoCRM with VirtualBox
  22. Web Developer Juice: 10 baby steps to install Memcached Server and access it with PHP
  23. Wiki: LAMP (software bundle)
  24. Zurmo: Forums: Enable Memcache after install
  25. Zurmo: Zurmo Cache System Explained
  26. ZurmoCRM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s