You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/common-usage/monitoring-system.adoc
+109Lines changed: 109 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,3 +104,112 @@ Here we can note that there is only one GDS procedure currently running, namely
104
104
We also see that it may use up to an estimated `234 kB` of memory.
105
105
Note that it may not currently be using that much memory and so it may require more memory later in its execution, thus possible lowering our current `freeHeap`.
106
106
Apparently it wants to use up to `16` CPU cores, leaving us with a total of `84` currently available cores in the system not requested by any GDS procedures.
107
+
108
+
[[Memory-reporting-procedures]]
109
+
== Memory reporting procedures
110
+
111
+
To facilitate memory management, the Neo4j GDS Library offers two memory reporting procedures, alongside the aforementioned monitoring capabilities.
112
+
113
+
[detailed-memory-listing]
114
+
=== Detailed memory listing
115
+
116
+
Through the `gds.listMemory` procedure, a user can obtain a combined list of their projected graphs and running tasks alongside their memory footprint.
117
+
118
+
For graphs, the size of the in-memory graph is returned, whereas for algorithms the memory estimation i.e., the maximum memory needs that this task is expected to require over the course of its execution.
119
+
120
+
This procedure can help a user realize which of his operations might be memory demanding and plan accordingly (e.g., drop a graph, or termination a transaction).
121
+
122
+
A user can access only his own graphs or tasks, but an admin can obtain information for all users.
123
+
124
+
[[syntax]]
125
+
==== Syntax
126
+
.List the graphs and tasks of a user along with their memory footprint.
127
+
[source, cypher, role=noplay]
128
+
----
129
+
CALL gds.listMemory()
130
+
YIELD
131
+
user: String,
132
+
name: String,
133
+
entity: String
134
+
memoryInBytes: Integer
135
+
----
136
+
137
+
.Results
138
+
[opts="header",cols="1,1,6"]
139
+
|===
140
+
| Name | Type | Description
141
+
| user | String | The username
142
+
| name | String | The name of the graph or running task.
143
+
| entity | String | If the reporting entity is a task, this corresponds to its job id. Otherwise, it is set to "graph".
144
+
| memoryInBytes | Integer | The occupying memory
145
+
for a graph or the estimation of a task.
146
+
|===
147
+
148
+
=== Example
149
+
150
+
.List running tasks and graphs for Bob.
151
+
[source, cypher, role=noplay]
152
+
----
153
+
CALL gds.listMemory()
154
+
YIELD
155
+
user, name, entity, memoryInBytes
156
+
----
157
+
158
+
.Results
159
+
[opts="header",cols='2,2,2,2']
160
+
|===
161
+
| user | name | entity | memoryInBytes |
162
+
"Bob" | "my-graph" | "graph" | 20 |
163
+
"Bob" | "Node2Vec" | 111-222-333 | 234
164
+
|===
165
+
166
+
As we can see, Bob has projected a graph named 'my-graph' occupying 200 bytes memory, and is currently running Node2Vec which has a memory footprint of 234 bytes.
167
+
168
+
[memory-summary]
169
+
=== Memory Summary
170
+
171
+
The `gds.listMemory.summary` procedure provides an overview of the total graph memory, and the total memory requirements of running tasks for a given users.
172
+
173
+
174
+
A user can access only his own graphs or tasks, but an admin can obtain information for all users.
175
+
176
+
[[syntax]]
177
+
==== Syntax
178
+
.List the graphs and tasks of a user along with their memory footprint.
179
+
[source, cypher, role=noplay]
180
+
----
181
+
CALL gds.listMemory.summary()
182
+
YIELD
183
+
user: String,
184
+
totalGraphsMemory : Intger,
185
+
totalTasksMemory : Integer
186
+
----
187
+
188
+
.Results
189
+
[opts="header",cols="1,1,6"]
190
+
|===
191
+
| Name | Type | Description
192
+
| user | String | The username.
193
+
|totalGraphsMemory | Integer| The total requirement for that user's graphs.
194
+
| totalTasksMemory | Integer | The total requirements of that user's tasks.
0 commit comments