Pergunta de entrevista da empresa Rackspace Technology

Add enough swap space to total 4G and make it persist through a reboot.

Resposta da entrevista

Sigiloso

9 de set. de 2013

created a 16GB /swapfile; [root@dworksdbtest ~]# free -g total used free shared buffers cached Mem: 31 0 30 0 0 0 -/+ buffers/cache: 0 30 Swap: 19 0 19 How to create the /swapfile? dd if=/dev/zero of=/swapfile bs=1024 count=16384000 * count = swapsize-in-MB * 1024; 16384000 = 16000 * 1024; mkswap /swapfile in /etc/fstab, added "/swapfile swap swap defaults 0 0" reboot check with 'free -g' and 'cat /proc/swaps'

1