python 및 머신러닝 교육, 슬로우캠퍼스


Redis 에서 process fork를 수행하게 되면 그 프로세스에 연결된 메모리 page table을 

복사해야 하므로,  HW (또는 AWS같은 가상화 cloud)에 따라 fork 실행에 필요한 시간이 다르다.


특히 Xen같은 가상화(VM)솔루션은 fork 시간이 많이 필요하다.

아마존의 AWS EC2는 Xen기반이기 때문에 fork가 느리다. 아래의 비교를 보면  6G 메모리의 약 1.5초 소요된다.



http://redis.io/topics/latency

Fork time in different systems

Modern hardware is pretty fast to copy the page table, but Xen is not. The problem with Xen is not virtualization-specific, but Xen-specific. For instance using VMware or Virutal Box does not result into slow fork time. The following is a table that compares fork time for different Redis instance size. Data is obtained performing a BGSAVE and looking at the latest_fork_usec filed in the INFO command output.


    • Linux beefy VM on VMware 6.0GB RSS forked in 77 milliseconds (12.8 milliseconds per GB).
    • Linux running on physical machine (Unknown HW) 6.1GB RSS forked in 80 milliseconds (13.1 milliseconds per GB)
    • Linux running on physical machine (Xeon @ 2.27Ghz) 6.9GB RSS forked into 62 millisecodns (9 milliseconds per GB).
    • Linux VM on 6sync (KVM) 360 MB RSS forked in 8.2 milliseconds (23.3 millisecond per GB).
    • Linux VM on EC2 (Xen) 6.1GB RSS forked in 1460 milliseconds (239.3 milliseconds per GB).
    • Linux VM on Linode (Xen) 0.9GBRSS forked into 382 millisecodns (424 milliseconds per GB).


    WRITTEN BY
    manager@
    Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

    ,