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 4 of 4
Tutorial - Increase Magento’s perfomances without [edit] a lot of [/edit] core changes
 
Dx3webs
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-12-16
 

ok I have no idea what I did or what magic element I tweaked (I think it was the prefork.. my original settings were mental) but my results on magebenchmark has shot from 5 TPS to 40 TPS?? go figure.. well at least this is more in line with what I think it should be and I am less embarased by the results smile

Let just hope that what ever tweaking I did I have not undone since the last benchmark.. will leave things to settle down and hope for the best.

Thanks again for all the tips

Andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
dltr_org
Sr. Member
 
Avatar
Total Posts:  167
Joined:  2008-09-12
rockdale, sydney, australia
 

Gr8 thread to follow. I was looking for best option to “save session data in” and landed in this thread. Very helpful smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
pdatoon
Sr. Member
 
Total Posts:  107
Joined:  2008-10-22
 

Interesting thread thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
Procyon
Jr. Member
 
Total Posts:  20
Joined:  2010-04-16
 

Can anybody provide some help with the temporary cache (tmpfs).

I followed the steps but now I get an error, which doesn\’t really tell me anything
http://www.moress-charms.com/order/

mount tmpfs /var/www/html/magento/var/cache -t tmpfs -o size=64m

how do I undo this?

how do I get this to work? instead of /var/www/html/magento/var/cache I used my path which is /home/username/www/order/var/cache

Thanks in advance!

 
Magento Community Magento Community
Magento Community
Magento Community
 
1adam12
Jr. Member
 
Total Posts:  10
Joined:  2008-07-29
 

Using Centos 5.4? You are going to need php 5.2 so this is what helped me:

vi /etc/yum.repos.d/centos-test.repo

and then add this:

[c5-testing]
name
=CentOS-5 Testing
baseurl
=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
gpgcheck
=1
gpgkey
=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

Next, install php like this:

yum --enablerepo=c5-testing install php php-devel php-mysql php-pear

pecl install apc

vim 
/etc/php.d/apc.ini

Add the following
:

[PHP_APC]
extension
=apc.so

[APC]
apc
.enabled 1
apc
.shm_segments 1
apc
.shm_size 64
apc
.max_file_size 10M
apc
.stat=1

And now - installing memcached:

yum install libevent libevent-devel

cd 
/usr/local/src
wget http
://www.danga.com/memcached/dist/memcached-<LATEST VERSION>.tar.gz
tar xzvf memcached-<LATEST VERSION>.tar.gz
cd memcached
-<LATEST VERSION>
LDFLAGS=\'-Wl,--rpath /usr/local/lib\' ./configure --prefix=/usr/local
make 
make install

I had to install pecl-memcached not using yum because there is a version conflict:

yum install zlib-devel

pear install pecl
/memcache

Configure as you have seen things configured in the beginning of this thread, install magento, add this into your local.xml (before the closing </global> directive):

<backend>apc</backend> <!-- optional?????? -->
<
fast_backend>apc</fast_backend>
<
slow_backend>apc</slow_backend>

- do your restarts - etc. and you should have a working memcached/magento installation.  I saw big improvements in responsiveness - even having mysql with query cache and memcached running on the same server.

In case you need it:

vim /etc/my.cnf

insert:

query-cache-type 1
query
-cache-size 20M

and restart mysql:

/etc/init.d/mysqld restart

Tom Tsatsos - CEO / Adam Medeiros - Lead Web Developer
#10 LLC
http://www.nr10.com
San Francisco, CA
415-357-1771

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 
asrenzo - 28 May 2008 04:54 AM

Here’s a simple tutorial on how to improve Magento’s performances without changing core files.
I’m sorry this tutorial won’t help users hosting their store on a shared environment.

Installation instructions will continue my fedora / centos install guide

5 - Use a tmpfs filesystem for magento/var/cache
Supposing your magento leaves in /var/www/html/magento, we need to :
Stop apache

service httpd stop
Clean cache
cd /var/www/html/magento/var/cache/
rm -rf mage*
Mount a tmps cache
mount tmpfs /var/www/html/magento/var/cache -t tmpfs -o size=64m
For more space change 64m by any value (take care of your system RAM)

Restart apache

service httpd restart

This sets up tmpfs as a one time test environment that doesn’t survive reboot. In order to allow it to come back automatically on reboot, after doing the above, you need to add a line to your /etc/fstab file as follows

# /var/www/html/magento/var/cache/
tmpfs    /var/www/html/magento/var/cache/    tmpfs    size=64m,mode=0775,uid=magento,gid=magento    0    0

Code blocks are never to be trusted on this board, it insists on splitting /var/www/html/magento/var/cache/ with a newline

In the above, uid is your login id and gid is your group id your apache process is running under. If uid and gid aren’t set, they default to root, and the first person accessing Magento upon reboot gets the error screen with a report id to hunt for and the stack trace telling you the cache directory is not writeable.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dx3webs
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-12-16
 
Procyon - 11 May 2010 09:23 AM

Can anybody provide some help with the temporary cache (tmpfs).

I followed the steps but now I get an error, which doesn\’t really tell me anything
http://www.moress-charms.com/order/

mount tmpfs /var/www/html/magento/var/cache -t tmpfs -o size=64m

how do I undo this?

how do I get this to work? instead of /var/www/html/magento/var/cache I used my path which is /home/username/www/order/var/cache

Thanks in advance!

Its a bit late but to ‘undo’ simply un-mount with

umount /var/www/html/magento/var/cache

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magazento
Sr. Member
 
Avatar
Total Posts:  155
Joined:  2010-01-08
Russia,Volgograd
 

Recommend to read this: http://www.magentocommerce.com/whitepaper/
We achieved great results with this

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 4 of 4