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!

7 Replies

Make sure this isn't the problem: http://www.linuxatemyram.com/

> 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?

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:

             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

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! :)

Hi, check this if you haven't seen already

http://www.linode.com/forums/viewtopic.php?t=5299

maybe you'll found something usefull :)

> 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!

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.

      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/gen … nd-fastcgi">http://www.magentocommerce.com/wiki/general/installing-with-lighttpd-and-fastcgi

For improving site speed and memory usage this article is extremely important:

http://www.crucialwebhost.com/blog/impr … ery-cache/">http://www.crucialwebhost.com/blog/improving-magento-speed-and-performance-with-mysql-query-cache/

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct