If I use a command
geth --cache=1024, how many blocks it will hold runtime in cache. And what will be the size of each block. Is there any calculation? And is there any way using which we can force to write the data present in cache to leveldb files.?
I found this explanation from a reddit user and thought it will be useful to you in order to understand some things.
Ethereum has a gas limit rather than a block size. The gas limit is a cap on both processing and storage/bandwidth because the cost of a transaction/function is fixed in units of gas for each type of instruction.
The gas limit is voted up or down by each miner and each miner determines what gas price it is willing to accept which is like bitcoin transaction fees but on a per gas basis rather than a per transaction basis.
To figure out how many transactions can fit in a block you dont need to know what the price of gas is. You just need to know how much gas a transaction uses and divide the gas limit by that.
If the network receives a load of spam transactions that start filling up blocks then miners have 2 choices. They can vote up the gas limit to fit in more transactions or they can start increasing the gas price and reject transactions that pay too low a fee. Like with bitcoin a transaction with a low fee might still get through but it would have to wait until a miner that accepts a lower fee (lower gas price) is willing to let it in.
With a sustained spam attack it would just getprogressively more costly to do transactions until either the spammer runs out of money or the miners make so much money that they start expanding the network capacity...
All that this user says is true, and it's very well-explained.
As you see, it works quite different from Bitcoin scheme.
EDIT I leave here the reddit full discussion about that
Hope it helps.