ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the recommended size of swap partition?

user-image
تم إضافة السؤال من قبل Mostafa Mohamed Abdelrahman Mohamed , Senior Virtualization and Application Management Executive , Qatar National Bank - ALAHLI
تاريخ النشر: 2014/10/20
Muhammad Anzar
من قبل Muhammad Anzar , DevOps/DevSecOps Architect , Confidential

Red hat recommends setting as follows for RHEL5:

The reality is the amount of swap space a system needs is not really a function of the amount of RAM it has but rather the memory workload that is running on that system. A Red Hat Enterprise Linux5 system will run just fine with no swap space at all as long as the sum of anonymous memory and system V shared memory is less than about3/4 the amount of RAM. In this case the system will simply lock the anonymous and system V shared memory into RAM and use the remaining RAM for caching file system data so when memory is exhausted the kernel only reclaims pagecache memory.

Considering that1) At installation time when configuring the swap space there is no easy way to predetermine the memory a workload will require, and2) The more RAM a system has the less swap space it typically needs, a better swap space

Conclusion

If Linux kernel is going to use more than2GiB swap space at a time, all users will feel the heat. Either, you get more RAM (recommend) and move to faster storage to improve disk I/O. There are no rules, each setup and configuration is unique. Adjust values as per your requirements. Select amount of swap that is right for you.

Bijay kumar Shah
من قبل Bijay kumar Shah , IT Officer , Himalayan Snax and Noodles Private Limited

At-least1.5 times of the physical memory 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟