1

I am working with a 32 Gb EC2 (r5a.xlarge) with the Amazon Linux 2 AMI 2.0.20201126.0 x86_64 HVM gp2. Currently, my Pandas Data Frame has a shape of (36072, 36072) - which translates to 9.69 GiB with the float64 datatype.

Am confused why the EC2 throws the below Memory Error

MemoryError: Unable to allocate 9.69 GiB for an array with shape (36072, 36072) and data type float64

enter image description here

I faced this issue, first, when i ran a smaller EC2 instance (16 gb RAM / t3a.xlarge) today as well. Quite lost how to get this resolved...

I noticed that quite a few Linux posts talk about overcommit mode. One such SO post is here - https://stackoverflow.com/a/57511555/3228300

However, EC2 says I don't have access to set the overcommit mode.

vsdaking
  • 476
  • 9
  • 22

0 Answers0