For JVM Arguments, I'm using this:
-Xms512m -XX: PermSize=128M -XX:MaxPermSize=512m
I set the Minimum Memory Allication to 3000 and Maximum to 5000.
Your Java arguments are misconfigured.
-Xms512m: You say you are setting minimum heap memory to 3000 and maximum to 5000. So why are you then calling an argument that potentially overwrites those settings? In the best case scenario this argument is ignored and does nothing, in the worse case it overwrites your minimum=3000 setting with minimum=512.
-XX: PermSize=128M: Never EVER fix PermSize unless you absolutely know what you're doing and your application absolutely requires it fixed. In all other scenarios, setting this is a bad idea. Use -XX:MaxPermSize instead.
-XX:MaxPermSize=512m: Two issues with this: first, because you set PermSize to a fixed value above, this parameter gets ignored. Second, if it did not get ignored, this is way too much. Default is 80. Setting it to 128m is more than enough, 160m at most. If this value needs to grow beyond 160, you a.) have a memory leak because of a faulty mod and b.) will very quickly run into performance issues.
Memory Allocation: Setting both minimum and maximum to the same value will improve performance. Because of your double call of the minimum setting, you potentially have a minimum 512 / maximum 5000 setting, which is a huge gap, which can motivate the garbage collector into wasting CPU cycles on unneeded cleanups (each of which may potentially pause the game for a tick, causing the impression of microstutter). Assign no more than 2 GB for a single client, and no more than (0.5 GB * concurrent player count) for a server. Extra memory beyond that won't help, and if you go beyond 8 GB on a single client, Java starts to hiccup.
Additional performance can potentially be gained from:
-XX:AggressiveOpts: Activates extra runtime optimizations that are currently in testing for future Java releases. May or may not do anything, depending on your Java version and the application you're running.
-XX:UseConcMarkSweepGC and
-XX:CMSIncrementalMode: Activates an alternative garbage collector that attempts to do its work without pausing the application. May potentially help with microstutter, but doesn't absolve you from the need to configure your memory settings properly.
Using the JRockit JVM: For advanced users only. Replaces your vanilla Java installation with an experimental one that Minecraft likes a lot. You need an Oracle account to get access to JRockit. May require manually extending the CLASSPATH variable to load certain mods (like Redpower2 or TickThreading).