dijkstra (#16) - RAM Usage (#233) - Message List

RAM Usage

Hi!

I installed pgRouting with the packages from  http://www.kyngchaos.com/software:postgres on OSX. I set up a table with 2260 edges and applied the Dijkstra as well as the A* algorithm:

SELECT * FROM

shortest_path_astar( 'SELECT

oid AS id, anfang::int4 as source, ende::int4 as target, hinweg::double precision as cost, x1,y1,x2,y2

FROM kanten',266701249,30736715,false,false);

I seems to be impossible to solve on my 2 GB RAM machine. VM jumps up to >21GB of RAM usage, causing the computer to totally break down. After more than 12 hours I killed the postgres process...

I don't consider a network with 2260 edges as large. How can I limit the memory usage of the search function?

Martin

  • Message #823

    Hi,

    I can't tell much about OSX specific issues, but this seems to me a problem with the ID numbering. You have very large ID's. On Linux, PostgreSQL will just crash. It is not directly pgRouting problem, it is an issue with Boost library afaik.

    So what you can do is adding two new columns for your ID's and renumber the ID's starting from 1. Or you can also use the topology function "assign_vertex_id()" and it will create your topology quite fast with such a small network.