descartes_light icon indicating copy to clipboard operation
descartes_light copied to clipboard

Running out of memory!

Open Levi-Armstrong opened this issue 5 years ago • 5 comments

This can quickly become an issue when you have more than a few free degrees of freedom. A quick way to address this, if you cannot limit the search space of the free degree of freedom is increase your swap space. This can easily be done now on Ubuntu 18.04 and newer shown here.

Levi-Armstrong avatar Dec 12 '19 17:12 Levi-Armstrong

We should consider using Eigen's half float definition per your comment here

marip8 avatar Jan 21 '21 16:01 marip8

Some interesting heap profiling results from gperftools heap profiler using the benchmark executable

10 DOF, 1000 waypoints, 100 samples/waypoint

Ladder Graph (double) (168 MB)

ladder_graph_double_10-dof-1000-waypoints_100-samples

Ladder Graph (float) (89 MB)

ladder_graph_float_10-dof_1000-waypoints_100-samples

10 DoF, 2000 waypoints, 100 samples/waypoint

Ladder Graph (double) (337 MB)

ladder_graph_double_10-dof_2000-waypoints-100-samples

Ladder Graph (float) (177 MB)

ladder_graph_float_10-dof_2000-waypoints_100-samples

10 DoF, 100 waypoints, 1000 samples/waypoint

Ladder Graph (float) (767 MB)

ladder_graph_float_10-dof_100-waypoints_1000-samples

BGL Dijkstra Static Vertex Dynamic Edge (float) (8069 MB)

bgl_svde_float_10-dof_100-waypoints_1000-samples

BGL Dijkstra Static Vertex Static Edge (float) (8368 MB)

bgl_dijkstra_svse_float_10-dof_100-waypoints_1000_samples

marip8 avatar Dec 13 '23 21:12 marip8

BGL is consuming a significant amount of memory compared to the Ladder Graph implementation.

Levi-Armstrong avatar Dec 13 '23 21:12 Levi-Armstrong

BGL is consuming a significant amount of memory compared to the Ladder Graph implementation.

Yeah; pretty surprising. That implementation is also only supposed to allocate edges when the Dijkstra search chooses to open a node, so theoretically it could allocate fewer edges than the ladder graph

marip8 avatar Dec 13 '23 22:12 marip8

BGL is consuming a significant amount of memory compared to the Ladder Graph implementation.

Yeah; pretty surprising. That implementation is also only supposed to allocate edges when the Dijkstra search chooses to open a node, so theoretically it could allocate fewer edges than the ladder graph

I just ran a profile of the BGL static vertex static edge (SVSE) solver which adds all vertices and edges, and it only uses ~300MB more (~3.5%) memory than the supposedly more efficient SVDE solver

marip8 avatar Dec 13 '23 23:12 marip8