| Author |
Message |
nar
Joined: 16 Mar 2010
Posts: 12
|
| Posted: Tue Mar 16, 2010 2:18 pm Post subject: How to Optimize a Linode for Magento |
|
|
Does anyone have any experience using kloxo on a linode 360?
I have installed it and everything is running smoothly, however RAM usage is pretty high and I think it actually effects the performance of my magento ecommerce sites.
I am new to VPS (just switched from shared hosting) and would really appreciate some server optimization advice specific for kloxo and magento.
Thanks! |
|
| Back to top |
|
JAKEhp55
Joined: 14 Mar 2010
Posts: 7
|
| Posted: Tue Mar 16, 2010 9:12 pm Post subject: |
|
|
| Make sure this isn't the problem: http://www.linuxatemyram.com/ |
|
| Back to top |
|
nar
Joined: 16 Mar 2010
Posts: 12
|
| Posted: Wed Mar 17, 2010 3:59 am Post subject: |
|
|
Quote: Make sure this isn't the problem: http://www.linuxatemyram.com/
Thanks for the reply, I have seen this and I don't think it the issue. I am currently 133 into my 256M of swap. If I restart apache my RAM usage goes down to about 136 of 360M, but only for a short time. It quickly jumps back up and then goes into swap.
I suspect there are some very basic apache and mysql configuration changes that I can make to improve this, but I am quite new and just not sure what they are. I have looked at the guides in the linode library but am doubtful about how applicable they are for a linode 360 running kloxo and magento.
Any ideas please? |
|
| Back to top |
|
nar
Joined: 16 Mar 2010
Posts: 12
|
| Posted: Wed Mar 17, 2010 5:12 am Post subject: |
|
|
OK, so I have switched from apache to lighttpd in the kloxo control panel and it has made a huge difference so far. Here is the result of free -m:
Code:
total used free shared buffers cached
Mem: 360 232 127 0 15 119
-/+ buffers/cache: 97 262
Swap: 255 0 255
This is very good right?
The only change I had to make in order for magento to work with lighttpd was to add
Code:
server.error-handler-404 = "/index.php"
to the lighttpd.conf, then restart lighttpd.
Only one thing sill bothers me, page loads are still slightly slower than in my previous shared hosting environment. I suspect it may have something to do with mysql configuration since that is the biggest memory eater right now.
Advice much appreciated! :) |
|
| Back to top |
|
AndrijaM
Joined: 11 Mar 2010
Posts: 50
|
| Posted: Thu Mar 18, 2010 7:20 am Post subject: |
|
|
Hi, check this if you haven't seen already
http://www.linode.com/forums/viewtopic.php?t=5299
maybe you'll found something usefull :) |
|
| Back to top |
|
nar
Joined: 16 Mar 2010
Posts: 12
|
| Posted: Fri Mar 19, 2010 10:05 am Post subject: |
|
|
Quote: Hi, check this if you haven't seen already
http://www.linode.com/forums/viewtopic.php?t=5299
maybe you'll found something usefull Smile
Thanks, this is quite useful, but I am still a bit unsure about appropriate settings specific for kloxo and magento, especially since I am now using lighttpd instead of apache.
In particular, how to optimize mysql?
Thanks! |
|
| Back to top |
|
nar
Joined: 16 Mar 2010
Posts: 12
|
| Posted: Wed Mar 24, 2010 4:46 am Post subject: |
|
|
In order for magento to work properly using lighttpd, the following code needs to be added to the beginning of index.php. If this code isn't added, search and layered navigation won't work...and who knows what else.
Code:
if(empty($_GET) && FALSE !== strpos($_SERVER['REQUEST_URI'], '?'))
{
$tmp = parse_url($_SERVER['REQUEST_URI']);
$_SERVER['QUERY_STRING'] = $tmp['query'];
unset($tmp);
// populate $_GET array
parse_str($_SERVER['QUERY_STRING'], $_GET);
// populate $_REQUEST array
foreach ($_GET as $key => $val)
$_REQUEST[$key] = $val;
}
This set up guide is helpful:
http://www.magentocommerce.com/wiki/general/installing-with-lighttpd-and-fastcgi |
|
| Back to top |
|
nar
Joined: 16 Mar 2010
Posts: 12
|
| Posted: Sun May 23, 2010 2:15 pm Post subject: |
|
|
For improving site speed and memory usage this article is extremely important:
http://www.crucialwebhost.com/blog/improving-magento-speed-and-performance-with-mysql-query-cache/ |
|
| Back to top |
|
| |