2

Our dedicated server is running out of disk space and RAM. We are going to upgrade both. We currently have a basic RAID setup, two drives, first one writing to second - not sure if that counts as RAID 1 or 2.

Anyway, we have been recommended moving to RAID10 and “......separating MYSQL from the rest of the operating system to isolate DISK IO, and allow for greater performance without compromising resilience.”

Is it a good idea / possible to separate sql database from the rest of the site? Does it make any difference?

If going ahead with separating would we need to look at pathnames in coding to check they are relative and not absolute?

(We are not putting the db on a different server, it will be on the same server.)

Or is this pointless - should we concentrate on caching for mysql?

Thanks in advance.

8
  • you can go for a separate DB server. Based on what you describe you are getting some advice from some people that do hosting but have no idea what Magento is. Also RAID 10 means at least 4 drives, are you sure they are not just upselling hardware? Commented Sep 27, 2013 at 17:13
  • 1
    Lots of questions in one question: 1) It does if you want to maintain PCI compliance and if you have a REALLY busy site. 2) You local.xml will point to you db server, it can be local or separate Magento is dependent on so many factors including your server, but obviously traffic plays a huge part as well as the amount of sku's and stores/websites. I would recommend Memcached and REDIS along with Varnish Commented Sep 27, 2013 at 19:31
  • Our store is not particularly large in terms of products, but we do have a large amount of cms content pages, approximately 400. Commented Sep 28, 2013 at 19:12
  • MYSQL and magento still on the same server, just separated. We have been advised RAID10 will give us more speed and resilience. Plus upgrade disks and RAM. Not a very busy site, but has approx 400 cmd content pages. Want to know if worth the effort of separating sql from magento, whether will increase performance enough or more pain that its worth. So not having a separate db server. Hope that makes some sense. Commented Sep 28, 2013 at 19:19
  • Just to add we also have another site on the same server, not magento. Again not very busy, but about 6000 active profile pages. Current server running out of disk space and RAM. Commented Sep 28, 2013 at 19:24

2 Answers 2

1

It's not exactly sure how enterprisey the site is, but if you are running out of disk space because of media files (images, documents, video's) maybe consider moving those to the cloud, S3 for example, there are good modules available that can handle that for you.

Storage performance: Moving to to RAID to improve performance is good, but first make sure you are at least running SSD's. *

Make sure you run a proper cache backend: Redis

Make sure you have the whole suite of performance modules of Aoe installed (https://github.com/AOEmedia/)

If you don't have thát many unique pages and most of them could be cached you can use one of the many Varnish modules available and don't touch Magento at all for those pages.

Even if the development costs outweigh the price of a new server, optimizing the performance of your site makes the user experience of the customer better and lessens the need for new/expanded servers.

  • Disclaimer, I'm a developer not a sys-admin. As a developer I can attest that searching for a good Magento-specialized hosting company pays of, maybe you'll pay a bit more than a bare server but they know their sh*t and make your store FAST.
1

Is it a good idea / possible to separate sql database from the rest of the site? Does it make any difference?

Yes, this is absolutely a good idea. The webserver, PHP, and your MySQL instance are all fighting for limited resources, and disk IO quickly becomes a bottleneck on busy websites.

Unfortunately, this won’t be easy. In my experience, data centers have only limited staff that understand RAID setup and configuration. You might even have trouble finding a hardware RAID controller that’s compatible with your operating system. This move is still worth your troubles.

If going ahead with separating would we need to look at pathnames in coding to check they are relative and not absolute?

I’d review those, anyway. Your code should be as portable as is reasonably possible.

(We are not putting the db on a different server, it will be on the same server.) Or is this pointless - should we concentrate on caching for mysql?

Improving MySQL configurations is always a good plan. (see below for my preferred configurations)

Here’s my process for moving MySQL to a new RAID mount on Ubuntu 12.04 LTS…

  1. Apply software updates
  2. format RAID array as xfs or ext4 partition (fdisk and parted commands used to find RAID device)
  3. mount RAID array with noatime,data=writeback,noexec
  4. confirm connectivity and functionality of the block device
  5. edit /etc/fstab to mount the RAID array on startup
  6. restart the computer to confirm the array is automatically mounted
  7. create mysql/data and mysql/tmp directories on RAID mount
  8. cp existing MySQL data to mysql/data on RAID mount
  9. symbolically link old data location to RAID mount with ln -s
  10. symbolically old MySQL tmp location to RAID directory with ln -s
  11. edit /etc/mysql/my.cnf to point tmp directory at new location
  12. confirm connectivity and functionality of MySQL server
  13. remove old mysql files from /var/lib/mysql

Additional configuration details here: https://gist.github.com/parhamr/6177160

Not the answer you're looking for? Browse other questions tagged or ask your own question.