2 min if speed of 15 billion achieved and if i write private key and corresponding public key
Are you looking for uncompressed or compressed?
Since I do not know your purpose in this, I can't help you to shorten the pubs.
Regardless, 20 million priv keys and corresponding pubkeys should only take up about 2.5Gb in storage space.