Instead of creating a new MongoClient for each call to process_batch:

def process_batch(batch, start_index):```
    client = MongoClient("mongodb:************")

You should create a single MongoClient and share it between all the threads. Please report back on the performance after this change.