Frage

So I'm testing some extreme writes, 10 individual insert...simple for loop (let's keep the topic simple for a moment)...I've got 'wait for sync' turned on for the collection (in this case we need 100% commit when the call returns)... 2 machines... I run the loop on my main machine that I'm running the actual unit test from and it takes 3 minutes to write the 10k... if I write to my remote machine (same arangoDB settings), it takes 9 sec...Is the reason it's taking longer on my local machine due to it also running the unit tests? Or is it due to the SYNC/MSYNC issues of the drive that the arangoDB FAQ warns about?

"From the durability point of view, immediate synchronization is of course better, but it means performing an extra system call for each operation. On systems with slow sync/msync,"

Is there a setting or whatever to check on a drive or system to determine what my values are for the sync/msync of the device?

thanks for the help!!

War es hilfreich?

Lösung

First of all the actual speed strongly depends on your hard disk.

For example for a notebook with SSD under MacOSX I get:

arangod> t = time(); for (i = 0;  i < 1000;  i++) db.unsync.save({ name: "Hallo " + i }); time() - t;
0.03408193588256836
arangod> t = time(); for (i = 0;  i < 1000;  i++) db.sync.save({ name: "Hallo " + i }); time() - t;
6.904788970947266

So writing 1000 documents is 200x times faster.

For a desktop with harddisk under Linux I get:

arangod> t = time(); for (i = 0;  i < 1000;  i++) db.unsync.save({ name: "Hallo " + i }); time() - t;
0.08486199378967285
arangod> t = time(); for (i = 0;  i < 1000;  i++) db.unsync.save({ name: "Hallo " + i }); time() - t;
54.90065908432007

Here it is even worse. More than a factor of 600.

Regarding the difference between local and remote: That sounds strange. How do you access the remote machine? Do you use arangosh?

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top