Q1:how is it possible that my build is 10 times bigger in size than the version proposed in the mongodb centos 7(x86) repository?
Q2:moreover,my built version run on centos7(aarch64),but it consume a lot of memory. How to improve the situation?
You haven't provided a lot of details that would be helpful, such as the SCons invocation you used, etc, or what you are observing as the memory utilization.
You haven't provided a lot of details that would be helpful, such as the SCons invocation you used, etc, or what you are observing as the memory utilization.
However, to answer your first question, you are almost certainly looking at an unstripped binary. I suggest reading this discussion on mongodb-user for more background: https://groups.google.com/forum/#!topic/mongodb-user/3uCmYyLIjhI.
For the second question, you are going to need to provide more details. How much memory is it using?