English Français Deutsch

RAM Disk

Create a RAM disk on MacOS Server (1 GB)

: diskutil erasevolume HFS+ 'ramdisk' `hdiutil attach -nomount ram://2000000`
Started erase on disk2
Unmounting disk
Initialized /dev/rdisk2 as a 977 MB case-insensitive HFS Plus volume
Mounting disk
Finished erase on disk2 ramdisk

Move to ramdisk

: cd /Volumes/ramdisk

Create folders for your website

: mkdir sitename

Allow access to write

: chmod 777 sitename

Activate setting in site/configuration.php

$swRamdiskPath = '/Volumes/ramdisk/sitename/';

Alternative Berkeley DB

If you cannot install a RAM disk, you can use the Berkeley DB to store copies of the revisions. The access to a file is about 2ms, while it is 25ms if you access it normally. This should speed up any kind of query and relation functions.

Set configuration.php
$swRamdiskPath = 'db';