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

.
Menu