Http write response is slow

We are observing slow response while writing data to influx (1.7) using http write.

Write response time is (ms)…38 – byte size is…26842… (number of inserts statements in this batch count is…59)
Write response time is (ms)…44 – byte size is…19690… (number of inserts statements in this batch count is…46)

38 & 44 milliseconds to insert this small batch? Any idea what we can do to improve this to single digit milliseconds?

Other meta information regarding our setup is,

  1. client is running on same box influx
  2. Influx has plenty of memory, cpu available (12gb ram, 8 core) — In fact the resource usage of influx is .01% cpu and similar memory.
  3. Series cardinality is around 200
  4. Around 30 measurements

Thanks for time & help!

If you are most concerned with response time and don’t care if the write is actually flushed out to disk and ack’d then you should consider using the UDP writer instead of http.

Also it is worth noting that Influx does better when you batch writes of 5-10k points. Not saying you aren’t batching but if you do more web requests with small batch sizes, there is a penalty.

Is there a specific reason you are trying to get the write response time to sub 40 ms?

@Esity, Just want to confirm about batching. Is it 5-10k points/request or 5-10k values(fields)/request? I got confused because here I saw

750,000 field writes per second

Please confirm. Also what are your suggestions on batching when I have 3 tags and 7 fields? Thanks.