How much memory does it take to store an session on the server?

search for a lot of some say hundreds of bytes, some say 4K session 6k, if a simple key pair value, 32-bit encrypted value, how much should it occupy, and how to check the total memory occupied by these session in linux?

Jun.22,2021

the actual size depends on your session content. Generally speaking, it will not be very large. I have an example here for your reference:

clipboard.png

sessioncookieuseruserid32mongoDBmongoDB:

in theory, if this session is stored in memory but not stored in mongoDB, the space it occupies should be the same, maybe there will be a slight difference. At present, I don't know how to analyze the memory space. Please add it.


this is related to the data stored in session. At the same time, a large number of requested data will lead to an increase in the number of session, taking up server memory resources

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e475d6-44c22.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e475d6-44c22.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?