Hi,
Recently we switched from hosting jupyterhub in EC2 machine to AWS EKS.
Below is the comparison between old setup and new setup-
Setup | Configuration |
---|---|
EC2-old | m5.4xlarge - 16 cores, 64GB RAM, 2880 Mbps EBS bandwidth |
EKS-new | m5a.4xlarge - 16 cores, 64GB RAM, 4750 Mbps EBS bandwidth |
We are using EFS as persistent volume in EKS so EBS bandwidth doesn’t matter here. So the old and new configurations are similar.
However, the scripts execution is 3 times slower in EKS based jupyterhub.
Script-
from random import random
def estimate_pi(n=1e7) - > “area”:
in_circle = 0
total = n
while n != 0:
prec_x = random()
prec_y = random()
if pow(prec_x, 2) + pow(prec_y, 2) <= 1:
in_circle += 1 # inside the circle
n -= 1
return 4 * in_circle / total
%prun estimate_pi()
I ran above script in both the setups-
Old-
New-
So far what i have observed-
- The nbextensions are not the cause as both setups have same extensions enabled.
- We have below CPU and RAM allocation for every user -
Setup | Configuration |
---|---|
EC2-old | 4 cores , 16GB RAM when launching single server notebook |
EKS-new | 1/2 total cores, RAM Guarantee - 1GB, Limit - 32GB |
Still digging into this issue.
What could be the reason for this slowing down of kernels.
Could it be the container that i’m using for data science env?
Need your help,suggestions in this?
Thanks