1

I've got a web project that pretty much consists of three parts: Code, Assets and Cache.

I'm thinking of splitting it through multiple drives - Put my whole Code into SSD partition, Assets onto big HDD and Cache, which has many I/O operations, into Ram disk. Does this setup make sense?

If so, should I adjust my partition table to handle this configuration or using ln will be sufficient?

Uriziel
  • 121
  • 2
  • Why CODE Into an SSD for a web project? COde will not be used a lot and is that not anyway cached in memory anyway by the runtime? – TomTom Feb 25 '14 at 13:09

2 Answers2

2

Sounds to me like too much complexity. That might just work against you and decrease performance, of yourself and of the software (incorrect setup for example).

I would just put together a raid10 (using a hardware controller or mdadm, see for example: How to create a bootable redundant Debian system with a 3 or 4 (or more) disk software raid10?) for all data which needs to be retained and use a ramdisk for data which can be deleted because of a reboot. You could use /dev/shm for that, it's a ramdisk that comes with linux by default, fills up to about half the RAM size (that's configurable) and dynamically expands and shrinks depending on need.

Regarding using symlinks, that to me sounds like a good idea. It requires the least reconfiguration. Just move the data, create a symlink and it should still work as before. The only catch in my experience is when you use a chroot environment, then you of course have to move the whole chrooted environment and not just the data.

aseq
  • 4,550
  • 1
  • 22
  • 46
  • 1
    I actually can have only RAID 0/1 (I'm currently using 1 for my SSD). I guess putting my assets on HDD will decrease performance, but I won't have enough space on my SSDs for them. The main issue is that whether I should use links or set up the partitions in locations of cache/assets. – Uriziel Feb 25 '14 at 10:56
  • I updated my answer regarding symlinks. – aseq Feb 26 '14 at 09:09
1

Yes. You will have a very fast and optimized system.

Altough there are cases, when it is ok, and there are cases with alternative priorities (f.e. if you have only a very little budget for the hardware).

peterh
  • 4,914
  • 13
  • 29
  • 44