Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Optimization server for Magento
 
Black Cat
Mentor
 
Avatar
Total Posts:  3481
Joined:  2008-02-14
Assemini / Cagliari (Italy)
 

Hi.
Lately so many people have problems with the installation of Magento on their dedicated servers.
Magento first of all, results to be Very slow, especially when products are added, the cart is visited, etc. Over this, some people find some crashes of the services Apache and php and the only way to restore the services it is to restart HTTPD.

It would be a lot of profit to have a list of the services to have active and not to have assets, the parameters of configuration for php, mysql and Apache that can improve the performances of Magento.

I hope in one answer of yours
Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
Francesco2008
Member
 
Total Posts:  67
Joined:  2008-03-26
 

Hello,

I’m having these issues with Magento 1.0 installed on my server, a Dell PowerEdge 860 with 1GB Ram and 1,8 Ghz Dual Core cpu.

I’m using CENTOS 5 and Plesk 8.3.

PHP 5.25
APACHE 2.2.3
MYSQL 5.0.22

Magento seems to be very slow when I try to add a product to cart; also it crashes after few minutes of use and starts to show only blank pages. I have to restart HTTPD service to let it work again…

I would like to know how to configure PHP.INI and APACHE and MYSQL daemons, please.

My PHPINFO (extract of it)

./configure’ ‘--build=i686-redhat-linux-gnu’ ‘--host=i686-redhat-linux-gnu’ ‘--target=i386-redhat-linux-gnu’ ‘--program-prefix=’ ‘--prefix=/usr’ ‘--exec-prefix=/usr’ ‘--bindir=/usr/bin’ ‘--sbindir=/usr/sbin’ ‘--sysconfdir=/etc’ ‘--datadir=/usr/share’ ‘--includedir=/usr/include’ ‘--libdir=/usr/lib’ ‘--libexecdir=/usr/libexec’ ‘--localstatedir=/var’ ‘--sharedstatedir=/usr/com’ ‘--mandir=/usr/share/man’ ‘--infodir=/usr/share/info’ ‘--cache-file=../config.cache’ ‘--with-libdir=lib’ ‘--with-config-file-path=/etc’ ‘--with-config-file-scan-dir=/etc/php.d’ ‘--disable-debug’ ‘--with-pic’ ‘--disable-rpath’ ‘--without-pear’ ‘--with-bz2’ ‘--with-curl’ ‘--with-exec-dir=/usr/bin’ ‘--with-freetype-dir=/usr’ ‘--with-png-dir=/usr’ ‘--enable-gd-native-ttf’ ‘--without-gdbm’ ‘--with-gettext’ ‘--with-gmp’ ‘--with-iconv’ ‘--with-jpeg-dir=/usr’ ‘--with-openssl’ ‘--with-png’ ‘--with-pspell’ ‘--with-expat-dir=/usr’ ‘--with-pcre-regex=/usr’ ‘--with-zlib’ ‘--with-layout=GNU’ ‘--enable-exif’ ‘--enable-ftp’ ‘--enable-magic-quotes’ ‘--enable-sockets’ ‘--enable-sysvsem’ ‘--enable-sysvshm’ ‘--enable-sysvmsg’ ‘--enable-track-vars’ ‘--enable-trans-sid’ ‘--enable-yp’ ‘--enable-wddx’ ‘--with-kerberos’ ‘--enable-ucd-snmp-hack’ ‘--with-unixODBC=shared,/usr’ ‘--enable-memory-limit’ ‘--enable-shmop’ ‘--enable-calendar’ ‘--enable-dbx’ ‘--enable-dio’ ‘--without-mime-magic’ ‘--with-libxml-dir=/usr’ ‘--with-xml’ ‘--with-apxs2=/usr/sbin/apxs’ ‘--without-mysql’ ‘--without-gd’ ‘--without-odbc’ ‘--disable-dom’ ‘--disable-dba’ ‘--without-unixODBC’ ‘--disable-pdo’ ‘--disable-xmlreader’ ‘--disable-xmlwriter’ ‘--without-sqlite’ ‘--disable-json’

I really hope to receive help soon!

Many thanks,
Best Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
alanin
Member
 
Total Posts:  67
Joined:  2008-02-25
Nordhausen, Germany
 

i have experienced, that magento is very slow when adding products to the cart - mostly it takes me bout 6 to 20! seconds to add a single product to the cart

i tried to find out where it takes magento so long and it is this line in app/code/core/Mage/Checkout/Model/cart.php in line 395

$this->getQuote()->save();

this is the first step - i am going deeper and deeper into magento to find out why this is happening

at the moment we cannot switch to magento cause its a pain to wait 20 seconds till a product is added to the cart

or software:
Redhat Linux Fedora 6
MySQL 5
PHP 5

hardware:
4GB RAM
Xeon QuadCore CPU (dunno which one)

the hardware should be fast enough to handle that - but seems its not…

 
Magento Community Magento Community
Magento Community
Magento Community
 
jog
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2007-12-10
Herford / Germany
 

Our Server-Hardware:

AMD Athlon 64 X2 6000+ Dual Core
6 GB DDR2 RAM
2 x 750 GB SATA II

running on:

Debian etch-64
PHP Version 5.2.0-8+etch10
mysql 5.0.32

We have about 80’000 products. We havnt accountered probelms with the cart, yet. But for sure Magento behave really slow. Search queries take more than 10 Sec. Browsing the catalog ( 1400 categories ) is about the same time. Using a filter in the categories takes twice as long.

I am really not sure, if we can stick with Magento. It seems like its not made for bigger stores. In the mysql-slow-query-log, I find queries that just dont make too much sense to me. Like this one:

(((e.entity_id '23191') or (e.entity_id '23202') or (e.entity_id '23221') or (e.entity_id '
23234'
) or (e.entity_id '23238') or (e.entity_id '23278') or (e.entity_id '23279') or (e.entity_id '23280') or (e.entity_id '23281') or (e.entity_id
 
'23282') or (e.entity_id '23283') or (e.entity_id '23284') or (e.entity_id '23296') or (e.entity_id '23301') or (e.entity_id '23306') or (e.entit
y_id 
'23308') or (e.entity_id '23314') or (e.entity_id '23373') or (e.entity_id '23379') or (e.entity_id '23380') or (e.entity_id '23381') or (e.e
ntity_id 
'23382') or (e.entity_id '23383') or (e.entity_id '23384') or (e.entity_id '23387') or (e.entity_id '23388') or (e.entity_id '23389') or
(
e.entity_id '23500') or (e.entity_id '23501') or (e.entity_id '23512') or (e.entity_id '23513') or (e.entity_id '23514') or (e.entity_id '23524')
 or (
e.entity_id '23525') or (e.entity_id '23565') or (e.entity_id '23566') or (e.entity_id '23567') or (e.entity_id '23572') or (e.entity_id '235
73'
) or (e.entity_id '23574') or (e.entity_id '23575') or (e.en

( thats just a snip, whole query is attached )

To be honest, I am more than just disappointed and frustrated. And believe me, I am indeed a developper myself. Was hoping to finally find a shop system that fits our needs. For now, I just feel like we wasted the last 12 weeks, working on magento.

File Attachments
query.sql.txt  (File Size: 124KB - Downloads: 155)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Hviid
Jr. Member
 
Total Posts:  6
Joined:  2008-04-02
 

As far as I remember, Magento is based on Zend Framework… Which to my notices is quite slow… we can only hope that the further development of Zend Framework http://framework.zend.com, also will result in a faster Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
peterw83
Member
 
Total Posts:  44
Joined:  2007-11-12
 

We all need to work together to bring about performance improvements.  I’m doubtful we can launch our site on the Magento code until the performance issues are improved.  Our current site on oscommerce code is roughly 5 times faster in terms of pageload times than the bare bones install of Magento on the same server.

Can we begin to build a roadmap for the needed improvements?

 
Magento Community Magento Community
Magento Community
Magento Community
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-04-01
Los Angeles, CA
 
alanin - 04 April 2008 03:10 AM

i have experienced, that magento is very slow when adding products to the cart - mostly it takes me bout 6 to 20! seconds to add a single product to the cart

i tried to find out where it takes magento so long and it is this line in app/code/core/Mage/Checkout/Model/cart.php in line 395

$this->getQuote()->save();

this is the first step - i am going deeper and deeper into magento to find out why this is happening

at the moment we cannot switch to magento cause its a pain to wait 20 seconds till a product is added to the cart

or software:
Redhat Linux Fedora 6
MySQL 5
PHP 5

hardware:
4GB RAM
Xeon QuadCore CPU (dunno which one)

the hardware should be fast enough to handle that - but seems its not…

Yeah, the Cart Controller and Quote Classes are really slow.  I commented out a few functions and speed increase dramatically.

The indexAction() function in CartController took forever.

I commented out cart->init() and cart->save(), which seem to speed things up.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alanin
Member
 
Total Posts:  67
Joined:  2008-02-25
Nordhausen, Germany
 
hyteckit - 04 April 2008 11:15 AM

Yeah, the Cart Controller and Quote Classes are really slow.  I commented out a few functions and speed increase dramatically.

The indexAction() function in CartController took forever.

I commented out cart->init() and cart->save(), which seem to speed things up.

i did that too now - wow, nice speed bump - im down to about 3 secs - i also activated the cache on the page and going to test abit with that, maybe its working shouldnt do that much, but when not changing nething and reloading the cart its helping abit…

the next thing i am going to try is to rebuild this bit

Mage_Eav_Model_Config::getAttribute    1.8386    1465    19,660,800    106,112,944
 
Magento Community Magento Community
Magento Community
Magento Community
 
YoavKutner
Guru
 
Avatar
Total Posts:  491
Joined:  2007-08-08
 

@alanin - we are aware of the quote module being a bit slow. We have some improvements to this and should make it available shortly

Thanks

yoav

 
Magento Community Magento Community
Magento Community
Magento Community
 
alanin
Member
 
Total Posts:  67
Joined:  2008-02-25
Nordhausen, Germany
 

thank you alot for this info Yoav

so im going to wait for the improvements, before i make something bad wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Danielc1234
Sr. Member
 
Avatar
Total Posts:  175
Joined:  2008-01-09
Miami, FL - United States
 

@ hyteckit can you tell us exactly what you commented out and where? And what draw backs are going to be happening by doing this?
And does this also help the speed of the front end as well? - Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
alanin
Member
 
Total Posts:  67
Joined:  2008-02-25
Nordhausen, Germany
 

its in app/code/core/Mage/Checkout/controllers/CartController.php

in the Line 59 you find the public function indexAction() and there is a $cart->init(); and a $cart->save();

I just commented that out and it was fast - i just clicked around abit and put stuff into the cart, and didnt recognized something negative - but i didnt tried alot yet - never tried the full ordering process after i commented that out…

Alanin // Joerg

 
Magento Community Magento Community
Magento Community
Magento Community
 
Danielc1234
Sr. Member
 
Avatar
Total Posts:  175
Joined:  2008-01-09
Miami, FL - United States
 

Alanin...Thanks!
I’m gonna give it a try. I sure would like to know what effects this will have if any.
Maybe a Team Member can give us some insight of the benefits and draw backs by doing this.
Anything for SPEED!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Danielc1234
Sr. Member
 
Avatar
Total Posts:  175
Joined:  2008-01-09
Miami, FL - United States
 

Didnt work. Got an error when adding something to the cart and checkout.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alanin
Member
 
Total Posts:  67
Joined:  2008-02-25
Nordhausen, Germany
 

my indexAction…

public function indexAction()
    
{
        Varien_Profiler
::start('TEST1: '.__METHOD__);
        
#$this->getQuote()->setCacheKey(true); //set to true for testing // cache is not used for cart page
        
Varien_Profiler::stop('TEST1: '.__METHOD__);
        
Varien_Profiler::start('TEST2: '.__METHOD__);
        
$cart $this->_getCart();
        
Varien_Profiler::stop('TEST2: '.__METHOD__);
        
Varien_Profiler::start('TEST3: '.__METHOD__);
        
#$cart->init();
        
Varien_Profiler::stop('TEST3: '.__METHOD__);
        
Varien_Profiler::start('TEST4: '.__METHOD__);
        
#$cart->save();
        
Varien_Profiler::stop('TEST4: '.__METHOD__);
        
Varien_Profiler::start('TEST5: '.__METHOD__);

        foreach (
$cart->getQuote()->getMessages() as $message{
            
if ($message{
                $cart
->getCheckoutSession()->addMessage($message);
            
}
        }

        $this
->loadLayout();
        
$this->_initLayoutMessages('checkout/session');
        
$this->_initLayoutMessages('catalog/session');

        
$this->renderLayout();
        
Varien_Profiler::stop('TEST5: '.__METHOD__);
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Danielc1234
Sr. Member
 
Avatar
Total Posts:  175
Joined:  2008-01-09
Miami, FL - United States
 

Alanin...it worked this time! Wow what a difference in speed it makes. I sure would like to know what negative things might happen by doing this.
Great work.....thanks a lot.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2