The difference between your Internet server and your LAN server (in terms of traffic) is probably *not* what has caused it to fail. I say this because the amount of traffic from 100 users submitting quizzes will be small whether it is to a local server (your LAN) or to a remote server (over the Internet).
The difference is more likely to be due to the RAM or the number of users.
RAM is like weights on a balance. You have the amount of RAM on one scale, and your software needs on the other. So long as the RAM > needs, everything is fine. But the moment needs > RAM, it doesn't just slow down, it tips entirely. If one machine has 2GB RAM and the other has 1GB, then this is significant.
The biggest issue will be your number of users. If it works with 23 users, that doesn't mean it will work with 100 users four times as slowly. It may fail entirely. Moodle scales badly when lots of people submit quizzes at the same time.
You say that you are doing load testing with software. How are you doing this / what software?
The problem is likely to be 100 people all pressing "Submit" at the same time. If you can stagger this, i.e. 10 people submit, followed by 10 people, followed by 10 people... etc. then this will probably make a big difference.
EDIT: However, you say that your Internet server can handle load which your local server cannot even with increased RAM). If you're sure your test is accurate, then the difference is likely to be in the configuration of
Apache or
MySQL on the (local) LAN server. Check the configuration files for these processes and look for any problems. E.g. very little cache for My
SQL. See
http://docs.moodle.org/en/Performance for guidance.