Ask Your Question

Why is uuid generation so slow?

asked 2018-06-25 15:16:53 -0500

jeff gravatar image

It seems that the uuid:uuid() function is very slow. Sometimes it causes a pipeline calling it to slow way down or even stop. What is going on?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-25 15:23:36 -0500

jeff gravatar image

The core issue is the entropy source. The entropy pool is ultimately what drives the random UUID generation performed in Data Collector by the uuid function. On many Linux systems, this entropy pool can be quickly exhausted. The problem seems particularly bad on virtual server environments (ex: Amazon EC2).

Follow the steps outlined in the documentation to set up an external service to help regenerate the entropy pool.

Another simpler workaround is to set the entropy source to be /dev/urandom (instead of the default, which is /dev/random). Be aware this may have security implications for your application. To do this, set the following JVM property for your Data Collector process:

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-06-25 15:16:53 -0500

Seen: 35 times

Last updated: Jun 25