Let's do some quick math. We will assume that you are using Phabricator Bitnami stack and you need some memory for Apache, PHP, etc. Let's say 1GB (I am being conservative, probably you can reserve less than that). Now we have 3GB available. It is a good practice to allocate 90% (of 3GB) of memory to MySQL. For our workload, we assume connection handling and other MySQL connection-based overhead will take up 0.5GB (leaving 2.5GB). 0.4GB is likely to be consumed by various other global buffers ( innodb_log_buffer_size, Table Caches, other miscellaneous needs, etc.), which now leaves 2.1GB. Considering the 5-7% overhead that the InnodB Buffer Pool has, a sensible setting is
innodb_buffer_pool_size=2G or, even better
Hope it helps.