Get Maximum out of 4.3.1: The Best Server Configuration

[size=4][font=arial, sans-serif]Hi guys,



Here I would like to write some tips that will make your CS-Cart 4.3.1 really fast. We use this configuration on our demo server: demo.cs-cart.com



Here is what you should do:

1. use the PHP version 5.6 (this one is the fastest, so if you have an ability to update to 5.6 do it. PHP 5.6 increases the performance)

2. use OPcache (it caches the compiled PHP code into the memory. it will be used automatically if it is installed and enabled)

3. i[/font]nstall mod_deflate on your server (this is the apache mod that compresses the html/css/js files during data transmission)

[font=arial, sans-serif] 4. install Imagick - this is PHP library, similar to GD, which resizes images (Imagick will compress resized images)

if you have installed imagick, replace 'gd' with 'imagick' in config.local.php

'image_resize_lib' => 'imagick'

5. use APCu for cache, and redis for sessions. The config.local.php file should have the following lines:


$config['cache_backend'] = 'apc';
$config['session_backend'] = 'redis';




Hope this will help. Please share other tricks here if you have any.



P.S. We use Apache as a web-server.[/font][/size]

does this all apply to light speed?



do you have a document with the install and config settings that I can send to my hosting admin?



Thanks

my server running on nginx and APC still i need install opcache ?

I'm also running Litespeed.

Would be nice if while you are doing these you tagged which one can be used on other versions.

@imac

4. [color=#282828][font=arial, sans-serif]install [/font][/color]Imagick , would that apply to 4.2.4 as well?



fastcgi or php-fpm?

I was told by host that mod_deflate is not used with Lightspeed. Lightspeed has its own cache.

Bob

[quote name='pbannette' timestamp='1430431833' post='213111']

I was told by host that mod_deflate is not used with Lightspeed. Lightspeed has its own cache.

Bob

[/quote]



mod_deflate is output compression (not cache), and yes afaik, lightspeed already does automatic compression

LiteSpeed has ESI but CS-Cart is not compatible with Litespeed ESI yet.

See the comments here: http://cscart.uservo…rt-with-litespe

You can also vote for the diea there.



LiteSpeedTech explains why its important:

[quote]“The biggest draw for LSWS 5.0 is ESI support for LSCache. This will allow site owners to designate certain parts of a page as uncacheable (AKA “punch holes” in the page) but still cache the remaining cacheable parts. Caching parts of pages will allow site owners to cache much, much more of their content. Effective ESI improvement will greatly cut resource usage and speed up many sites (which is why we’ve been talking about it so much).



Hole-punching especially helps e-commerce, where things like the shopping cart cannot be cached, but appear on almost every page. For e-commerce sites, ESI is a crucial step in allowing effective use of page caching. To help meet this need, we will also be releasing a Magento caching extension soon. More details on this extension coming soon.”

[/quote]

I also use LiteSpeed and need LiteSpeed ESI support.

So esi is a http cache? Can't you just wack varnish in front and use that to cache static elements?

[quote name='imac' timestamp='1430405104' post='213082']

[size=4][font=arial, sans-serif]Hi guys,



Here I would like to write some tips that will make your CS-Cart 4.3.1 really fast. We use this configuration on our demo server: demo.cs-cart.com



Here is what you should do:

1. use the PHP version 5.6 (this one is the fastest, so if you have an ability to update to 5.6 do it. PHP 5.6 increases the performance)

2. use OPcache (it caches the compiled PHP code into the memory. it will be used automatically if it is installed and enabled)

3. i[/font]nstall mod_deflate on your server (this is the apache mod that compresses the html/css/js files during data transmission)

[font=arial, sans-serif] 4. install Imagick - this is PHP library, similar to GD, which resizes images (Imagick will compress resized images)

if you have installed imagick, replace 'gd' with 'imagick' in config.local.php

'image_resize_lib' => 'imagick'

5. use APCu for cache, and redis for sessions. The config.local.php file should have the following lines:


$config['cache_backend'] = 'apc';
$config['session_backend'] = 'redis';




Hope this will help. Please share other tricks here if you have any.



P.S. We use Apache as a web-server.[/font][/size]

[/quote]





if we use NGInx and Varnish along with the above Configuration. it would work perfect ?

My dear Ilya Makarov, as a community member I really appreciate this type of material over the forum, however I feel that giving a general idea of correct file permission for various files and folder in the same topic will enhance its value. Just my thought. Of-course one can find this information elsewhere.

file download from cscart main page something wrong. 4.3.1 MULTIVENDOR FILE SIZE IS 7 MB… NOT AROUND 70 MB



CHECK PLEASE

Hello,



[font=“Arial, sans-serif”]Few more tips:[/font][list]

[][font=Arial, sans-serif]Install NGINX with PHP-FPM SAPI.[/font]

[
][font=Arial, sans-serif]If you are not able to refuse Apache2, install NGINX as the frontend server for static files.[/font]

[][font=Arial, sans-serif]If you are using Apache, disable AllowOverride and move rules from .htaccess to the virtual host.[/font]

[
][font=Arial, sans-serif]If you can't use Redis[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]or[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]APCu[/font][font=Arial, sans-serif], but you have enough[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]RAM for MySQL query cache[/font][font=Arial, sans-serif], then[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]move[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]the cache[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]to the database.[/font]

[*][font=Arial, sans-serif]Try[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]HHVM[/font][font=Arial, sans-serif]. [/font][font=Arial, sans-serif]Experimental support[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]is[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]in[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]4.3.1[/font][font=Arial, sans-serif].[/font]

[/list]

[quote name='P-Pharma' timestamp='1430435501' post='213119'] LiteSpeed has ESI but CS-Cart is not compatible with Litespeed ESI yet. […] You can also vote for the diea there. LiteSpeedTech explains why its important: [/quote]



I think that CS-Cart not necessary to do adaptation for LS in the near future. The share of LS very low, and the efficiency of LS has not been confirmed by anyone other than marketers of the project.



[font=Arial, sans-serif]Also this integration[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]will require major changes[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]to the CS-Cart core that[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]will probably break[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]backward compatibility[/font][font=Arial, sans-serif]. [/font][font=Arial, sans-serif]Nevertheless[/font][font=Arial, sans-serif], the main idea is[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]attractive[/font][font=Arial, sans-serif], but its[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]implementation[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]does not depend on[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]LS:[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]ESI[/font][font=Arial, sans-serif]/SSI[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]supported in[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]Apache, NGINX[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]and[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]Varnish[/font][font=Arial, sans-serif].[/font]


[quote name='kogi' timestamp='1430439706' post='213122'] So esi is a http cache? Can't you just wack varnish in front and use that to cache static elements? [/quote]

[font=Arial, sans-serif]This is more than[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]the cache[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]of static files[/font][font=Arial, sans-serif]. [/font][font=Arial, sans-serif]ESI[/font][font=Arial, sans-serif]/SSI[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]would allow[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]CS-Cart[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]to reduce the generation time[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]of the page[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]by placing[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]in[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]separate cache[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]blocks on[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]the page.[/font]


[quote name='teosu' timestamp='1430408161' post='213090'] my server running on nginx and APC still i need install opcache ? [/quote]

No, you dont.


  • APC is opcode cache and data store
  • APCu is only data store
  • OPcache is only opcode cache

[quote name='goncharov' timestamp='1430588864' post='213208']

[font=Arial, sans-serif]Few more tips:[/font][list]

[*][font=Arial, sans-serif]Install NGINX with PHP-FPM SAPI.[/font]

[/list]

[/quote]



What about the .htaccess rules? Doesn't cs-cart require those to run?




[quote][list]

[*][font=Arial, sans-serif]If you are using Apache, disable AllowOverride and move rules from .htaccess to the virtual host.[/font]

[/list]

[font=Arial, sans-serif]​[/font][font=Arial, sans-serif][/quote][/font]

[font=Arial, sans-serif]Again, are there .htaccess is some of the directories that are needed?[/font]



[font=Arial, sans-serif]Like the one in /app[/font]


Order allow,deny
Deny from all

[quote name='goncharov' timestamp='1430588864' post='213208']

I think that CS-Cart not necessary to do adaptation for LS in the near future. The share of LS very low, [/quote]

How is this relevant? You are looking at the share for all webservers on the internet, when you are selling paid software to customers who make money with their websites. Thats a very specific niche which can not be compared to all of the internet.



Most servers on the net are for non-commercial purposes. LiteSpeed is expensive paid software. It will only be bought by companies who make money from their website, who can make the investment back from using less hardware and creating more income from faster websites and who want to have an easy to use interface. In other words: LiteSpeed is popular with e-commerce companies. That's why so many in this thread report that they are using LSWS. Thats also why Litespeed 5 comes with Magento support.


[quote name='goncharov' timestamp='1430588864' post='213208']

and the efficiency of LS has not been confirmed by anyone other than marketers of the project.

[/quote]

What do you mean? The efficiency of LSWS Cache has been proven over and over again. There are plenty of independent benchmarks. I

LiteSpeed cache is highly efficient. I know from experience with LSWS4. But dont believe me. Just checkout the benchmarks.

[quote name='P-Pharma' timestamp='1430615076' post='213221']What do you mean? The efficiency of LSWS Cache has been proven over and over again. There are plenty of independent benchmarks. I

LiteSpeed cache is highly efficient. I know from experience with LSWS4. But dont believe me. Just checkout the benchmarks.

[/quote]

[font=Arial, sans-serif]I no longer work[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]in a team[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]of CS-Cart[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]and do not necessarily represent[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]the official views of the[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]company[/font][font=Arial, sans-serif].[/font]



[font=Arial, sans-serif]I mean o[/font][font=Arial, sans-serif]n the Internet[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]there is no independent research of performance,[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]with the exception of tests[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]LitespeedTech[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]where[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]LS[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]wins[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]an incorrectly configured[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]NGINX[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]and Apache[/font][font=Arial, sans-serif]. In my opinon, p[/font][font=Arial, sans-serif]resented on[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]the official website of the[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]benchmarks are[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]ridiculous[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]and[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]not objective. [/font][font=Arial, sans-serif]I urge people[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]not[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]to take their word[/font][font=Arial, sans-serif].[/font]



[font=Arial, sans-serif]Besides, I'm not against adaptation. I'm just saying[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]that it[/font][font=Arial, sans-serif]'s not the time[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]now[/font][font=Arial, sans-serif]. I think, [/font][font=Arial, sans-serif]CS-Cart team[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]has more important[/font][font=Arial, sans-serif] [/font][font=Arial, sans-serif]tasks[/font][font=Arial, sans-serif].[/font]

[quote name='kogi' timestamp='1430594810' post='213211']

What about the .htaccess rules? Doesn't cs-cart require those to run?

[/quote]



All of the rules .htaccess require adaptation for NGINX: it is not necessary, but highly desirable. This rules required to work SEO and API, and also to limit the execution of PHP.

[quote name='goncharov' timestamp='1430638851' post='213226']

This rules required to work SEO

[/quote]



So without the rules, will SEO work under nginx?