Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
9829697c
Commit
9829697c
authored
Dec 02, 2013
by
Matthieu Muffato
Browse files
"Unused memory" instead of "Wasted memory"
parent
8416064b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
scripts/generate_timeline.pl
scripts/generate_timeline.pl
+6
-6
No files found.
scripts/generate_timeline.pl
View file @
9829697c
...
...
@@ -73,7 +73,7 @@ sub main {
workers
=>
'
Number of workers
',
memory
=>
'
Memory asked (Gb)
',
cores
=>
'
Number of CPU cores
',
wast
ed_memory
=>
'
Wast
ed memory (Gb)
',
unus
ed_memory
=>
'
Unus
ed memory (Gb)
',
);
if
(
$mode
)
{
die
"
Unknown mode '
$mode
'. Allowed modes are:
"
.
join
("
,
",
keys
%allowed_modes
)
unless
exists
$allowed_modes
{
$mode
};
...
...
@@ -124,7 +124,7 @@ sub main {
# Get the memory used by each worker
my
%used_mem
=
();
if
(
$mode
eq
'
wast
ed_memory
')
{
if
(
$mode
eq
'
unus
ed_memory
')
{
my
$sql_used_mem
=
'
SELECT meadow_name, process_id, mem_megs FROM lsf_report
';
foreach
my
$db_entry
(
@
{
$dbh
->
selectall_arrayref
(
$sql_used_mem
)})
{
my
(
$meadow_name
,
$process_id
,
$mem_megs
)
=
@$db_entry
;
...
...
@@ -167,8 +167,8 @@ sub main {
}
else
{
my
$process_signature
=
$meadow_name
.
"
_____
"
.
$process_id
;
if
(
exists
$used_mem
{
$process_signature
})
{
my
$
wast
ed_memory
=
(
$mem_resources
{
$resource_class_id
}
||
$default_memory
)
-
$used_mem
{
$process_signature
};
$events
{
$event_date
}{
$analysis_id
}
+=
$offset
*
$
wast
ed_memory
/
1024
.
if
$
wast
ed_memory
>
0
;
my
$
unus
ed_memory
=
(
$mem_resources
{
$resource_class_id
}
||
$default_memory
)
-
$used_mem
{
$process_signature
};
$events
{
$event_date
}{
$analysis_id
}
+=
$offset
*
$
unus
ed_memory
/
1024
.
if
$
unus
ed_memory
>
0
;
}
}
}
...
...
@@ -328,7 +328,7 @@ __DATA__
generate_timeline.pl {-url <url> | [-reg_conf <reg_conf>] -reg_alias <reg_alias> [-reg_type <reg_type>] }
[-start_date <start_date>] [-end_date <end_date>]
[-top <float>]
[-mode [workers | memory | cores |
wast
ed_memory]]
[-mode [workers | memory | cores |
unus
ed_memory]]
[-n_core <int>] [-mem <int>]
=head1 DESCRIPTION
...
...
@@ -371,7 +371,7 @@ __DATA__
-end_date <date> : maximal end date of a worker (the format is ISO8601, e.g. '2012-01-25T13:46')
-top <float> : maximum number (> 1) or fraction (< 1) of analysis to report (default: 20)
-output <string> : output file: its extension must match one of the Gnuplot terminals. Otherwise, the CSV output is produced on stdout
-mode <string> : what should be displayed on the y-axis. Allowed values are 'workers' (default), 'memory', 'cores', '
wast
ed_memory'
-mode <string> : what should be displayed on the y-axis. Allowed values are 'workers' (default), 'memory', 'cores', '
unus
ed_memory'
-n_core <int> : the default number of cores allocated to a worker (default: 1)
-mem <int> : the default memory allocated to a worker (default: 100Mb)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment