From 529e96771b64b4cd48ba35ea264b640aa23bb260 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Wed, 15 Jan 2014 22:33:26 +0000 Subject: QPID-5484 [linearstore] Poor performance relative to legacystore. Partial fix: The use of /dev/random exhausts the kernel's supply of non-deterministic random data, and calls to read from it block until enough is available. It has been determined that /dev/urandom is good enough for this use-case (Journal serial numbers), and does not suffer from blocking. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1558592 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/linearstore/journal/JournalFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpp/src/qpid/linearstore/journal/JournalFile.cpp') diff --git a/cpp/src/qpid/linearstore/journal/JournalFile.cpp b/cpp/src/qpid/linearstore/journal/JournalFile.cpp index 8f6a311a84..129a9145d0 100644 --- a/cpp/src/qpid/linearstore/journal/JournalFile.cpp +++ b/cpp/src/qpid/linearstore/journal/JournalFile.cpp @@ -279,7 +279,7 @@ const std::string JournalFile::getFileName() const { //static uint64_t JournalFile::getRandom64() { - int randomData = ::open("/dev/random", O_RDONLY); + int randomData = ::open("/dev/urandom", O_RDONLY); if (randomData < 0) { throw jexception(); // TODO: Complete exception details } -- cgit v1.2.1