I've got a virtual dedicated server with 256MB guaranteed RAM (1GB bursted) - and my hosting provider offers an upgrade to 512MB guaranteed RAM (2GB bursted). Now I know the basics of what RAM is and does - but I'm not completely certain about how much it would effect the performance of my sites if I took the upgrade. For example: if I have a PHP script that currently takes approximately 20 seconds to run - would it take about 10 seconds if I had twice as much RAM?
More RAM + Faster Once when I had a server restored, I ended up with less than the default RAM, around 256 and was paying for a Gig. With 256 RAM a Search engine trying to crawl one type of site using the mySQL database using php would crash the server, and it took forever to load the script. When I got it back up to 1 Gig of RAM, it was back to normal...fast!!!!
It really depends on the operating system, the script itself, etc. If your PHP script is reading a ton of stuff into memory for example (enough that it starts using swap memory) then yeah, it will help a lot.
Thanks Nintendo and Shawn for your input. Specifically I'm looking to speed up scripts that generate images using the GD library and/or ImageMagick.
In general no. It will not be linear like that most likely anyway. Usually when you run out of RAM you fall off a cliff performance wise. If you have enough RAM adding RAM makes no difference if you are using your swap space it will help... often a lot.
Working of VDS or VPS is different than normal dedicated server. in normal physical server you are only one who shares all resources of a server but in VPS or VDS along with you there are other who are also sharing resources of server. there is also catch in burstable and guaranteed word. if there are couple of malfunctioning scripts with one of your VPS neighbour, it will degrade performence all vps running on server. in my experience there is no considarable (or noticeable) performence boost unless you upgarde 3 or 4 times more RAM and CPU resources.