Size of index large on AWS

Hello,

I did a migration of Mongodb 4.4 version from on premise linux to AWS server ( mngodb version 6).
I notice the size of index is 3 times on the AWS environment. Is this expected or there are some configuration required on AWS ?

Thanks.

@Shilpi_Pandey It is possible that the size of the index increased during the migration from on-premise Linux to AWS, but it’s hard to say without more information. Here are some possible reasons why the index size increased:

  • The MongoDB version in the AWS environment may have different default settings for index compression or other index-related configurations. You can check the MongoDB documentation to see if there are any differences in the default configurations between version 4.4 and version 6 that may cause the index size to increase.
  • The hardware configuration in the AWS environment may be different from the on-premise Linux environment, which could affect the performance of the indexing process. For example, if the AWS environment has slower CPU or less available memory, it may take longer to create the index and result in a larger index size.
  • The data in the AWS environment may be different from the on-premise Linux environment, which could affect the index size. For example, if there are more unique values in the index keys or if the data is more sparse, it could result in a larger index size.

To investigate further, you could try comparing the configurations and hardware settings between the two environments and see if there are any significant differences. You could also try running the same indexing process on both environments and compare the index sizes to see if there is a noticeable difference.
Overall, it’s not necessarily a problem if the index size increases, as long as it doesn’t cause any performance issues or storage capacity concerns.

How can a slower CPU or less available memory may produce a larger index size?

It is a data migration, the data should be the same and the indexes should be the same. I am sure that if they were not, the original author would not have complained and ask why the size is different. It looks again like a detail missed by ChatGPT.

This is what he did and he did notice a difference, that is why he posted.

Yeah, Mongodb documentation does not mention that the size of the index will be larger on the higher Mongodb version or on AWS.