Having dealt with a 512 MB RAM phone (LG Revolution) for the past two years, it was always lack of RAM that caused my lag.
Look in Settings --> Apps at your Running Services or Running Apps (not sure what it's called in Jellybean). The lower right corner will tell you the total available RAM, and the lower left the used RAM. And each entry in the list will tell you the instantaneous RAM consumption for that Service/App. (You can see what part of the reported used RAM is freeable by the Android system by using something like the "Free RAM" function in Superbox Pro, but there's really no point except curiosity since you're already experiencing lag and Android *will* free that RAM as it deems it's needed.)
Fast fix, short of killing apps (which can be counterproductive over the long run, because of the way Android learns about which apps to keep in memory), is to shutdown/restart.
Longer term ways to reduce RAM consumption:
- Exit apps you're not using.
- Uninstall apps that constantly take up a lot of RAM.
- Limit widgets.
- Limit total number of apps installed. When I removed 50 apps, I regained about 30 MB of free RAM on average.
I can't guess what number is good. For my phone on Gingerbread, I fly at 150 MB, lag terribly at 50 MB. Jellybean might have more RAM needs than that.