Miva Merchant

Last week we switched our ecommerce website from a 4-processor shared system to a single processor dedicated system.  Because of some customization we require to improve the site, the switch is necessary.  I looked at the specs of the proposed system and gave it the go-ahead after insisting the memory be increased from 512Meg to a gig.  The site went live, and promptly fell over.  I had not taken into account exactly how big of a resource hog Miva Merchant is compared to a “normal” (html, perl, php, etc.) system.

So we immediately moved everything to a dual processor box with 2 gigs of memory.  Much better.  It was running fairly well and we have root access so we could continue with our planned upgrades.

First thing was to install the latest stable of MySQL.  The shared system was still stuck on 3.x and we needed 4.x.  That was a quick and easy upgrade.  Next was adding OpenXB, an extension to Miva Merchant that gave it full SQL capabilities instead of using the archaic XBase file system.  That was a much trickier job and was handled brilliantly by Scott of Sebenza.

Finally, the big switch to PHP based web pages instead of going through the Miva Merchant engine.  Once everything was in place I made a few changes to .htaccess and most of the new changes went live.  Suddenly there was a 500% performance boost!

After looking over the system and running some tests I realized performance could be boosted even more with a good sized query cache.  I decided that too much cache was not necessarily a bad thing, so I set it to 256Meg, which is almost three times bigger than the entire product database.  To test the cache I ran a perl script which creates a tab delimited text file of the entire product line.  I have several of these for various search engines.  The first time through took a minute or so.  The second time took just a few seconds.  To be certain, I also ran a script for a different search engine feed and saw the same huge boost in performance as it used identical queries.

There are a few glitches and bugs in the new system, but we shouldn’t have any problems dealing with them after the weekend.  Lessons learned: 1. Miva Merchant is a major pig-dog.  2. MySQL’s query cache is awesome.  3. A single typo in a RewriteRule is a bad thing.

Leave a Reply