• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Question prefered way to move /var/lib/php/sessions to tmpfs

Brujo

Silver Pleskian
Plesk Guru
Ubuntu 16.04.4 LTS‬
Plesk Onyx Version 17.5.3 Update #43

since the Server has inough ram, what would be the prefered way to move /var/lib/php/sessions to tmpfs under Ubuntu?
 
Well, you'll improve performance just due to RAM being faster then disk.

You'll want to create the RAM disk first;

# mkdir /tmp/ramd
# chmod 777 /tmp/ramd
# mount -t tmpfs -o size=512M tmpfs /tmp/ramd/

(be sure to add it to fstab as well)

Then modify your PHP.ini;

session.save_path="/tmp/ramd"
 
Last edited:
@Émerson Felinto
Getting from Provider new Hardware Servers to be tested bevor replace existing root Servers and nowadays they come with 64Gig Ram & SSD drive, therefor I like to use on on side the RAM as best for performance and reduce writing to SSD.
 
Last edited:
@Mark Muyskens
under ubuntu /tmp it is already foreseen to be moved to tmpfs "systemctl enable tmp.mount"

so your idea is to change the session.save_php path settings per php Version/handler - any expirince what happens when Plesk update/upgrade the Versions?
 
Back
Top