sounds like your computer needs a clean.
Learn about your computer. Get a program called ccleaner
It's very good for cleaning up garbage that slows down your comp. This won't help your internet specifically, as it's better just for general computer speed, but it also cleans up a handful of browser related files that could make a difference.
Internet will never be slow because of RAM the two things are unrelated.
You may have a hacker/malware problem.
make sure you are using a reputable antivirus program and make sure that your computer is really clean.
I strongly recommend using AVAST and doing a "BOOT TIME SCAN". It's a very effective way of scanning, I believe even better than booting to safe mode. If you don't use AVAST, make sure you run your antivirus, spyware and adware checks in SAFE MODE.
Perform this check: Keep the connection to the internet open. close all programs that access the internet. anything else too.
Go to start menu, RUN PROGRAMS, type cmd.exe
From that window (dos mode), type netstat
and look for anything out of the ordinary. There should be no connections to anything other than 'localhost' and possibly your local router's IP address.
BE VERY CAUTIOUS with programs that 'speed up the internet' because they are OFTEN a "good source of" MALWARE!!!