Grab Android Tuner Free.
Make a nandroid backup.
Open Android Tuner.
Swipe twice to get to the leftmost pane.
Scroll down, find Kernel configuration (sysctl), see first screenshot.
Find kernel.shmmax and set to 320 MB, set to Apply on boot as shown in second screenshot.
Reboot to recovery, clear cache and Dalvik.
Reboot and try it out.
EDIT/Addendum - On occasion, Android Tuner seems to not save the change made. After changing and after first reboot, double-check that the value is the new one in Android Tuner. If not, simply reapply the change, and verify that Android Tuner has root privileges (it will be listed in SuperSU for example).
EDIT/Addendum 2 - Custom kernels may set this tuning parameter on their own to their preferred value and this won't let you override that.
If your system becomes borked in any way, do a nandroid restore.
Maybe pay attention to your web browser and anyplace else you've noticed lag or any sort of multitasking issues.
Please report your results.
Edit, June 2 - from my tests, I'm really on to believing that 384 - rather than 320 - is the right value for Viper4G. Please review the thread, thanks.
Make a nandroid backup.
Open Android Tuner.
Swipe twice to get to the leftmost pane.
Scroll down, find Kernel configuration (sysctl), see first screenshot.
Find kernel.shmmax and set to 320 MB, set to Apply on boot as shown in second screenshot.
Reboot to recovery, clear cache and Dalvik.
Reboot and try it out.
EDIT/Addendum - On occasion, Android Tuner seems to not save the change made. After changing and after first reboot, double-check that the value is the new one in Android Tuner. If not, simply reapply the change, and verify that Android Tuner has root privileges (it will be listed in SuperSU for example).
EDIT/Addendum 2 - Custom kernels may set this tuning parameter on their own to their preferred value and this won't let you override that.
If your system becomes borked in any way, do a nandroid restore.
Maybe pay attention to your web browser and anyplace else you've noticed lag or any sort of multitasking issues.
Please report your results.
Edit, June 2 - from my tests, I'm really on to believing that 384 - rather than 320 - is the right value for Viper4G. Please review the thread, thanks.