Running this in Windows Server 2016 Datacenter.
I have this fairly simple bit of python code that aggregates files into combines files, looping through each file, line by line, and based on the file name it merges them into the appropriate merged file. Anywhere from a 5Gb to 200Gb.
But when running this script on a big dataset(150Gb+) it appears to hog resources and other versions of the script running on the same server.
For example, another script trying to merge just 2Gb of files will just hang until the job operating on 150Gb of files is done. Which doesn't make sense to me. Considering this server has 4 virtual processors.
Idk if this is a python issue or a windows issue or what. Example of the sort of script in pseudocode:
Merged_Name = "Example"
with open (Merged_Name+".txt", "w+") as outf:
for i in os.listdir():
if i.contains(Merged_Name) and i != "Merged_Name.txt":
with open (i, "r") as inf:
for line in inf:
outf.write(line)