Today, I found out how EOS creates and saves new accounts. But I am still not sure whether EOS saves new accounts on RAM or on disk?
New accounts will consume RAM. The data of your new accounts will be saved in the
state which is in the RAM. However, if your machine running nodeos does not have enough memory for the whole
state, swapping will happen, which means your nodeos instance will have to access your virtual memory on hard drive and read/write disk frequently. This will drastically slow down your nodeos performance.
In addition, the transactions/actions that create your new accounts will be saved in block data. You could think of this as saved on disk (mostly).
Here is some description of RAM. i.e, RAM is used for permanent storage. One example is how account keys and balances needs to be stored in RAM and accessed very quickly every time they are called upon. So while it may not be the traditional definition of “permanent”, on the EOS blockchain RAM provides a permanent means of storage.
When you created account on testnet it means it occupied some RAM which is bp's RAM not your local machine's RAM.To check your ram usage you can either go on testnet site and go on account info tab or you can check by the command
cleos get account "ACCOUNT_Name" it will show you your account information.