I'm trying to log memory usage/available memory in a python app on a Google App Engine standard instance. Using psutil gives me the same value for an F2 instance as an F4 instance, so it doesn't seem to return what I'm expecting.
Is there a way to measure the available free memory so we know when an instance approaches its memory limit?

There are different ways to monitor the Memory Usage in Google App Engine.
On the Google Cloud Console, you can check the memory usage using the Dashboard on the App Engine.
.
Runtime API allows you to get CPU and Memory usage from the Python runtime. You can get a SystemStat memory usage with:
google.appengine.api.runtime.runtime.memory_usage()Cloud Profiler helps you analyze performance issues, CPU utilization, and memory usage.
GAE Mini Profiler does provide memory metrics; it will let you know how much memory was being used.
Apptrace is a package that provides a WSGI middleware for tracking memory usage in Google App Engine Python applications. Do take note that according to this documentation: