32-bit OS and MySQL
First, the OS (and the hardware?) may conspire to not let you use
all 4GB, if that is what you have.
If you have more than 4GB of RAM, the excess beyond 4GB
is _totally_ inaccessable and unusable on a 32-bit OS.
Secondly, the OS probably has a limit on how much RAM it will allow
any process to use.
Example: FreeBSD's maxdsiz, which defaults to 512MB.
$ ulimit -a
max memory size (kbytes, -m) 524288
So, once you have determined how much RAM is available to mysqld,
then apply the 20%/70%, but round down some.
If you get an error like
[ERROR] /usr/libexec/mysqld: Out of memory (Needed xxx bytes),
it probably means that MySQL exceeded what the OS is willing to give it.
Decrease the cache settings.