ilaurens

Active Member
Jul 13, 2013
28
0
1
cPanel Access Level
Root Administrator
Hallo,

I want to change tmp to a ramdisk in order to speed up the loading time, while having minimum effect on the harddisks.

So, there is two things that is on my mind.

1. How will tmp act when the disk is full?

2. How will mysql cache act when the disk is full?

I know it is possible to seperate but this is more a whatif question. As far I know mysql will turn off the caching, while tmp cannot upload anything nor create any new sessions.


If you own a CPanel server, I would like to know the tmp and mysql cache directory size. And amount of clients on that server.


Thank you :)
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,234
363
cPanel Access Level
DataCenter Provider
Twitter
Hello :)

The /tmp partition should be allotted at least 2G per the advanced partitioning guide at Advanced Options: Pre-Installation. It's not recommended to operate your system with a /tmp partition at 100% disk space usage. There are several potential problems that would arise, including the inability for MySQL to store temporary files or for PHP scripts to utilize new session files.

Thank you.
 

ilaurens

Active Member
Jul 13, 2013
28
0
1
cPanel Access Level
Root Administrator
Thank you, the link is pretty useful.

Sorry about that, I'm not natively English so might have put it wrong in a way. It's not that I want to mount a single harddisk(or with full capacity) to "/tmp", It's just I want to create a ramdisk(harddisk space from memory) and mount it as "/tmp", since temp does not contain any important data and just caching it does not matter that it'll loses all data inside the folder after power outage or reset.

The recommended space for tmp is 2 GB, but is there any recommendation for 1gb for 100 clients or something like that? Because more client = more usage = bigger temp I can assume.


The server will have enough memory, it will have at least 100 GB.

Edit: Woops, you gave already the awnser for tmp space. Sorry about that. Edited that part
 
Last edited:

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,234
363
cPanel Access Level
DataCenter Provider
Twitter
2G is standard, but there is no recommended size based on the number of accounts. It's difficult to predict exactly how much space will be required because each account or database may require a different amount of temporary space.

Thank you.
 

ilaurens

Active Member
Jul 13, 2013
28
0
1
cPanel Access Level
Root Administrator
I see thank you, I will give it a size I can spare ~ 10 GB after that I can always upgrade/downgrade it. Will also be using "tmpwatch" to clean it.
 

ilaurens

Active Member
Jul 13, 2013
28
0
1
cPanel Access Level
Root Administrator
Thank you for the response,

I think it might be and it might not be, truth told I did not put this to practice yet but I'm sure it depends on users. Mysql is cached which has a big gain in the long run, session files has a lot of i/o which might also be important.

This will be important when receiving high traffic count, this will be a big help. As far I know the file management system has caching build in, so that will probably take care of the smaller PHP files. <-- Only when having enough memory.

Though, Like you said this might be negligible, but it depends on Circumstances, amount of RAM to spare, amount of users, etc etc

Sorry, wrote this one fast, I do not have much time.

also this might be interesting for some(''dynamic allocation <3'): TipsAndTricks/TmpOnTmpfs - CentOS Wiki
 
Last edited: