Swap and runaway scripts and other considerations
Hi, in getting refamiliar with using swap i had a thought here and i wanted to get some clarification. I understand that cPanel cannot assist in the install or set up of swap but i feel having a conversation about swap in the general sense should be fine, i hope.
In considering swap, i was thinking that if i run out of memory then something is wrong and it should be fixed, maybe a runaway script using Mysql or another service. So if i run out of memory and get an error or warning then that tells me i need to start digging to see what the issue is and fix it. So in that case not setting up swap can be a good thing.
In that same thought if i do have swap and that swap saves me from seeing an error or warning then i dont know that something is wrong and whatever that is keeps happening.
My question is, is this an accurate hypothetical thought that i should consider when considering setting up swap? Or would linux shoot me a error or warning regardless?
Another consideration is how much swap if it is used. According to this
https://pickwicksoft.github.io/swapcalc/
i would need 2GB of swap. In that regard i can spare 2GB of disk space.
Thanks :)
-
Hey hey! I'm not sure if that's the correct way to think about it or not - in modern times, it's definitely used less than it was in the past.
Articles like this go into a LOT more detail than I could, so I'd recommend checking this out for more details on the hows and whys:
0 -
Great article, i do wish they would go more in depth on this part in the challenges section.
Security Considerations. Placing sensitive data in swap space could potentially lead to unauthorized access if proper encryption and management measures are not in place.
Talk about leaving a rabbit hole open lol I wonder what kind of measures are they talking about? Is it the same measures one might take with typcial programing and saving data to a database which i already do? Is it something specific to swap and linux handling of data? I have no idea what they mean by that? Maybe https?
Might be time to ask AI, because i have no idea. :)
0 -
I'm honestly not sure - there are definitely operating system hacks out there that could compromise swap space in a multi-user system, but you've already mentioned you're the only user on the machine, correct? If so, I wouldn't worry about it at all. This is getting into the more nitty gritty of how the OS handles data and wouldn't have much to do with cPanel itself.
1 -
Yes i am the only one on this machine.
Yeah i agree, i dont want to fall into the rabbit hole, i may never get out lol :)
1
Please sign in to leave a comment.
Comments
4 comments