Python Multiple clients too slow

#1

Hi guys.
I have a Python application than create a multiple clients of influxdb (can be UDP)
I use the most basic write method

jsonMetric = {
“measurement”: nodo,
“tags”: {
“instancia”: self.instancia,
“ipservidor”: self.ipServidor
},
“fields”: {
“value”: val
}
}
json_body.append(jsonMetric) // I apend several points here
then
and write with
self.client.write_points(jsonMetric, time_precision=‘s’)

All this proceses for only one connection takes around 0.3 seconds
When I add more “collectors” (40 of them) every with its own client, the write_points take around 3.2 seconds (the time of preparing data dont change, around 0.1 seconds)

Any Ideas why and how can I fix it??

I try share clients (10 for 30 collectors) and ussing UDP or HTTP but didnt change the result. The server hosting this app is 4 core and 12gb, Influxdb is in the same host.