Rodriguez Betancourt, Esteban
9854d473ad
json: Use reference counting in JSON objects
...
After profiling OVSDB insert performance it was found
that some significant portion of its time OVSDB is
calling the function json_clone.
Also, the current usages of json_clone never modify the json,
just keeps it to prevent it to be freed.
With that in mind the struct json, json_create, json_clone
and json_destroy were modified to keep a count of how many
references of the json struct are left. Only when that count
reaches zero the json struct is freed.
The old "json_clone" function was renamed as "json_deep_clone".
Some examples of the performance difference:
In these tests a test table with 4 columns (string, string,
bool, integer) was used. All the tests used "commit block".
*** 50 process each inserting 1000 rows ***
Master OVS
Test Duration 131 seconds
Average Inserts Per second 746.2687 inserts/s
Average Insert Duration 134.1382 ms
Minimal Insert Duration 0.166202 ms
Maximum Insert Duration 489.8593 ms
JSON GC Patch
Test Duration 86 seconds
Average Inserts Per second 1176 inserts/s
Average Insert Duration 82.26761 ms
Minimal Insert Duration 0.165448 ms
Maximum Insert Duration 751.2111 ms
*** 5 process each inserting 10000 rows ***
Master OVS
Test Duration 8 seconds
Average Inserts Per second 7142.857 inserts/s
Average Insert Duration 0.656431 ms
Minimal Insert Duration 0.125197 ms
Maximum Insert Duration 11.93203 ms
JSON GC Patch
Test Duration 7 seconds
Average Inserts Per second 8333.333 inserts/s
Average Insert Duration 0.55688 ms
Minimal Insert Duration 0.143233 ms
Maximum Insert Duration 26.26319 ms
Signed-off-by: Esteban Rodriguez Betancourt <estebarb@hpe.com >
Signed-off-by: Ben Pfaff <blp@ovn.org >
2016-10-04 16:04:25 -07:00
..
2016-03-30 13:04:32 -07:00
2015-03-05 14:11:53 -08:00
2016-09-14 10:54:40 -07:00
2016-03-19 10:02:12 -07:00
2016-09-21 18:02:59 -07:00
2016-06-29 15:24:18 -07:00
2016-04-14 13:47:18 -07:00
2016-07-22 17:09:17 -07:00
2016-09-30 12:59:14 -07:00
2016-06-03 13:18:19 -07:00
2016-05-16 17:46:55 -07:00
2016-05-16 17:46:55 -07:00
2016-07-22 17:09:17 -07:00
2016-07-22 17:09:17 -07:00
2016-07-29 16:52:01 -07:00
2016-09-19 09:52:22 -07:00
2016-09-19 09:52:22 -07:00
2016-05-09 16:42:56 -07:00
2016-05-09 16:42:56 -07:00
2016-03-18 14:02:41 -07:00
2016-03-18 14:02:41 -07:00
2016-03-18 14:02:53 -07:00
2016-08-15 17:26:15 -07:00
2016-08-15 17:26:15 -07:00
2016-08-08 09:11:21 -07:00
2016-07-27 18:53:27 -07:00
2016-07-27 18:51:51 -07:00
2016-07-27 18:53:27 -07:00
2016-07-27 18:52:13 -07:00
2016-09-21 18:00:02 -07:00
2016-07-27 18:53:29 -07:00
2016-03-19 10:02:12 -07:00
2016-09-14 16:51:27 -07:00
2015-12-01 10:14:10 -08:00
2015-12-01 10:14:10 -08:00
2016-09-23 12:06:59 -07:00
2016-07-27 18:53:27 -07:00
2016-06-27 20:36:16 -07:00
2016-05-16 14:11:03 -07:00
2016-07-26 07:13:43 -07:00
2016-06-27 20:36:16 -07:00
2016-06-29 18:19:40 -07:00
2016-08-12 02:29:01 -07:00
2016-08-12 02:29:01 -07:00
2016-07-22 17:09:17 -07:00
2016-08-15 17:26:15 -07:00
2015-06-23 09:43:24 -07:00
2016-01-12 10:43:39 -05:00
2016-06-23 15:57:22 -07:00
2016-06-24 09:17:00 -07:00
2016-06-24 09:17:00 -07:00
2016-09-19 09:52:22 -07:00
2016-08-15 17:26:15 -07:00
2016-03-29 06:23:36 -07:00
2016-09-19 09:52:22 -07:00
2015-06-16 08:21:28 -07:00
2016-07-27 12:56:04 -07:00
2016-09-19 09:06:21 -07:00
2016-07-27 12:56:04 -07:00
2016-07-27 12:56:04 -07:00
2016-04-27 15:00:37 -07:00
2016-04-27 15:00:37 -07:00
2016-08-10 13:54:07 -07:00
2016-07-22 17:09:17 -07:00
2016-03-30 13:01:21 -07:00
2016-07-22 17:09:17 -07:00
2016-09-19 09:52:22 -07:00
2016-09-21 18:04:06 -07:00
2016-03-30 13:04:32 -07:00
2016-03-30 13:01:21 -07:00
2016-01-20 10:02:53 -08:00
2016-07-18 22:45:51 -07:00
2016-07-22 17:09:17 -07:00
2016-07-22 17:09:17 -07:00
2016-07-22 17:09:17 -07:00
2015-08-02 12:04:06 -07:00
2015-08-02 12:04:06 -07:00
2015-08-02 12:04:06 -07:00
2015-08-02 12:04:06 -07:00
2016-10-04 16:04:25 -07:00
2016-09-19 09:06:17 -07:00
2015-03-12 17:01:10 -07:00
2016-07-22 17:09:17 -07:00
2015-08-28 14:55:11 -07:00
2016-09-02 15:55:00 -07:00
2016-09-30 12:59:14 -07:00
2016-09-19 09:52:22 -07:00
2016-04-14 13:48:25 -07:00
2016-06-07 08:22:33 -07:00
2016-06-07 08:22:33 -07:00
2016-07-22 17:09:17 -07:00
2016-09-14 16:51:26 -07:00
2016-09-14 16:51:26 -07:00
2016-09-19 09:52:22 -07:00
2016-05-16 13:14:29 -07:00
2016-07-22 17:09:17 -07:00
2016-03-19 10:02:12 -07:00
2016-09-30 12:59:14 -07:00
2016-07-22 17:09:17 -07:00
2016-03-19 09:43:12 -07:00
2016-08-15 11:07:37 -07:00
2016-09-30 10:59:00 -07:00
2016-06-07 11:15:01 -07:00
2016-08-15 11:07:47 -07:00
2016-10-04 08:47:18 -07:00
2016-07-24 11:47:28 -07:00
2016-06-02 11:50:34 -07:00
2016-04-29 15:07:39 -07:00
2016-09-02 16:01:12 -07:00
2016-06-02 11:50:34 -07:00
2016-09-27 11:06:09 -07:00
2016-09-21 11:31:41 -04:00
2016-07-22 17:09:17 -07:00
2016-09-20 08:52:51 -07:00
2016-09-27 11:06:09 -07:00
2016-07-27 18:53:27 -07:00
2016-07-22 17:09:17 -07:00
2016-07-05 08:33:13 -07:00
2016-06-13 14:22:32 -07:00
2016-07-13 15:11:54 -07:00
2016-07-22 17:09:17 -07:00
2016-03-30 13:10:18 -07:00
2016-07-22 17:09:17 -07:00
2015-10-13 15:34:16 -07:00
2016-09-19 09:52:22 -07:00
2016-09-19 09:52:22 -07:00
2016-07-29 16:52:02 -07:00
2016-08-30 10:47:24 -07:00
2016-09-19 09:52:22 -07:00
2016-05-18 19:39:18 -07:00
2016-09-19 09:52:22 -07:00
2016-09-19 09:52:22 -07:00
2016-10-03 10:09:56 -07:00
2016-04-18 08:49:59 -07:00
2016-07-22 17:09:17 -07:00
2016-09-19 09:52:22 -07:00
2016-09-23 12:06:59 -07:00
2016-04-14 16:38:31 -07:00
2016-09-23 12:06:59 -07:00
2016-04-14 13:48:25 -07:00
2016-04-14 13:48:25 -07:00
2016-03-30 13:10:18 -07:00
2016-03-30 13:04:32 -07:00
2016-03-30 13:04:32 -07:00
2016-07-22 17:09:17 -07:00
2016-07-22 17:09:17 -07:00
2016-06-07 11:18:08 -07:00
2016-07-22 17:09:17 -07:00
2016-08-03 17:01:03 -07:00
2016-07-29 16:52:01 -07:00
2016-03-24 09:30:57 -07:00
2016-07-05 16:32:23 -07:00
2016-01-11 09:59:49 -08:00
2016-07-18 22:58:45 -07:00
2016-07-18 22:58:45 -07:00
2016-07-22 17:09:17 -07:00
2016-07-22 17:09:17 -07:00
2016-07-22 17:09:17 -07:00
2016-08-15 17:12:17 -07:00
2016-09-23 12:06:59 -07:00
2016-09-23 12:06:59 -07:00
2016-07-22 17:09:17 -07:00
2016-05-18 10:14:37 -07:00
2015-03-31 17:10:58 -07:00
2016-07-22 17:09:17 -07:00
2016-08-14 16:51:06 -07:00
2016-08-14 16:51:06 -07:00
2016-07-22 17:09:17 -07:00
2016-10-03 14:11:40 -07:00
2016-10-03 14:11:40 -07:00
2016-07-22 17:09:17 -07:00
2015-03-03 13:37:37 -08:00
2016-07-22 17:09:17 -07:00
2015-07-24 09:20:05 -07:00
2016-07-22 17:09:17 -07:00
2016-03-30 13:04:32 -07:00
2016-08-10 14:58:51 -07:00
2016-08-10 14:58:51 -07:00
2016-09-23 12:06:59 -07:00
2015-06-11 17:28:37 -07:00
2016-07-22 17:09:17 -07:00
2016-03-24 09:30:57 -07:00
2016-03-24 09:30:57 -07:00
2016-07-28 09:41:06 -07:00
2016-03-24 09:30:57 -07:00
2016-07-22 17:09:17 -07:00
2016-03-30 13:10:18 -07:00
2015-12-14 05:12:34 -08:00
2016-03-30 13:10:18 -07:00
2015-12-14 05:12:34 -08:00
2016-03-30 13:04:32 -07:00
2016-03-30 13:01:21 -07:00
2016-06-13 14:22:32 -07:00
2015-08-28 14:55:11 -07:00
2016-07-22 17:09:17 -07:00
2016-07-08 16:17:20 -07:00
2016-09-02 11:46:59 -07:00
2015-08-28 14:55:11 -07:00
2015-08-28 14:55:11 -07:00
2016-07-22 17:09:17 -07:00
2016-04-14 13:48:05 -07:00
2016-04-14 13:48:05 -07:00
2016-07-22 17:09:17 -07:00
2016-08-08 11:00:37 -07:00
2016-08-08 11:00:37 -07:00
2016-09-15 10:40:35 -07:00
2016-04-22 08:18:23 -07:00
2016-07-19 20:06:45 -07:00
2016-07-13 13:43:37 -07:00
2016-07-22 17:09:17 -07:00
2015-08-21 15:36:54 -07:00
2015-08-21 15:36:54 -07:00
2016-08-08 09:11:21 -07:00
2016-05-20 10:05:10 -07:00
2015-03-03 13:37:37 -08:00
2016-07-22 17:09:17 -07:00
2016-08-03 07:23:30 -07:00
2016-07-19 20:06:45 -07:00
2016-08-23 13:25:36 -07:00
2016-04-14 16:38:32 -07:00
2016-02-12 12:39:07 -08:00
2016-03-19 10:02:12 -07:00
2016-03-19 10:02:12 -07:00
2015-06-27 12:38:33 -07:00
2016-06-26 20:31:28 -07:00
2015-06-27 12:38:33 -07:00
2015-06-27 12:38:33 -07:00
2016-07-22 17:09:17 -07:00
2016-07-22 17:09:17 -07:00
2016-04-14 13:48:05 -07:00
2016-09-21 18:04:06 -07:00
2015-12-04 08:40:56 -08:00
2016-07-29 16:52:01 -07:00
2016-05-18 19:39:18 -07:00
2016-09-20 11:38:59 -07:00
2016-09-19 09:52:22 -07:00
2016-09-19 09:52:22 -07:00
2016-04-14 13:48:05 -07:00
2016-03-19 10:02:12 -07:00
2016-08-03 07:23:30 -07:00
2016-08-03 07:23:30 -07:00
2016-08-12 10:00:57 -07:00
2016-07-27 17:58:44 -07:00
2015-06-09 18:20:02 -07:00
2016-04-14 13:40:32 -07:00
2016-08-03 07:23:30 -07:00
2015-03-12 17:01:10 -07:00
2016-03-30 13:10:18 -07:00
2016-07-29 16:52:03 -07:00
2016-07-29 16:52:01 -07:00
2016-02-10 13:36:04 -08:00
2016-06-26 20:31:28 -07:00
2015-12-01 10:07:24 -08:00
2016-08-08 09:11:21 -07:00