Context
I'm running some calculations on network data using a specific library which I have not coded. I have both small datasets (hundreds of rows) and big datasets (up to 10k rows).
Small datasets run fine but large ones take a lot of time not only in doing calculations (which is expected) but also in saving results to file which seems odd since I'm just saving a small pandas
DataFrame to csv.
Finally while doing the same operation in a Jupyter notebook I have encountered the error:
Unexpected error while saving file: Too many open files
Which I have attributed to Jupyter but has led me to inspect lsof
My question:
I checked the number of open files by typing the following in Bash:
lsof 2>/dev/null | grep name.surname | cut -f 1 -d ' ' | sort | uniq -c
(I had to grep my user since I'm on a shared server)
I get something like this:
34 bash
9 cut
13 grep
103 jupyter-l
30 lsof
12144 python3
4 (sd-pam
10 sort
4 sshd
60 systemd
9 uniq
103 ZMQbg/19
103 ZMQbg/20
103 ZMQbg/25
412 ZMQbg/9
I see that python3
has a big number next to it: is that all right?
Note: this happens both for the small and the large datasets during the whole time the script is running.