Root Access Daily
Root Access Daily
@RootAccessDaily

<b>Move your PHP sessions off the disk</b>

<b>Move your PHP sessions off the disk</b>

Every logged-in pageview writes a tiny session file to disk. On cheap VPS SSDs that's thousands of pointless writes burning your I/O and IOPS budget. Put them in RAM:

— <code>mount -t tmpfs -o size=128M tmpfs /var/lib/php/sessions</code>
— add it to <code>/etc/fstab</code> so it survives reboot

Sessions are throwaway data anyway; if the box reboots, everyone re-logs, who cares. Disk I/O on my forum box dropped 60%. Same trick works for nginx's proxy cache. Try it tonight.
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.
start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @dumay. Быстрый тест: $20 за канал, $1000 за пакет по сети.