2017-02-08 1 views
0

Wenn ein CMD-Batch auf einem Server ausgeführt wird, dauert der Start von R-Skripten lange, wie in der ROut-Datei bestätigt. Einschalten Ausführlich zeigt GC ist für alle Skripte für etwa 10 Minuten ausgeführt wird, diese Skripte in RStudioR GC() Garbage Collection auf CMD Batch-Ausführungszeit

gut läuft Hier wird die Befehlszeile in dem Task-Scheduler C: \ Programme \ R \ R-3.3.2 \ bin \ x64 \ R.exe "CMD BATCH" \ Server-Verzeichnis \ RFilename.R "

Die ROut-Datei sieht so aus/ Wie gesagt, dies passiert nicht, wenn in RStudio ausgeführt wird.

Jede Hilfe sehr geschätzt


'verbose' and 'quietly' are both true; being verbose then .. 
now dyn.load("C:/Program Files/R/R-3.3.2/library/methods/libs/x64/methods.dll") ... 

R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" 
Copyright (C) 2016 The R Foundation for Statistical Computing 
Platform: x86_64-w64-mingw32/x64 (64-bit) 

R is free software and comes with ABSOLUTELY NO WARRANTY. 
You are welcome to redistribute it under certain conditions. 
Type 'license()' or 'licence()' for distribution details. 

    Natural language support but running in an English locale 

R is a collaborative project with many contributors. 
Type 'contributors()' for more information and 
'citation()' on how to cite R or R packages in publications. 

Type 'demo()' for some demos, 'help()' for on-line help, or 
'help.start()' for an HTML browser interface to help. 
Type 'q()' to quit R. 

Garbage collection 1 = 0+0+1 (level 2) ... 
5.4 Mbytes of cons cells used (29%) 
1.4 Mbytes of vectors used (17%) 
Garbage collection 2 = 0+1+1 (level 1) ... 
15.6 Mbytes of cons cells used (83%) 
7.4 Mbytes of vectors used (94%) 
Garbage collection 3 = 0+1+2 (level 2) ... 
17.4 Mbytes of cons cells used (71%) 
7.9 Mbytes of vectors used (68%) 
Garbage collection 4 = 0+1+3 (level 2) ... 
23.0 Mbytes of cons cells used (73%) 
10.5 Mbytes of vectors used (72%) 
Garbage collection 5 = 0+1+4 (level 2) ... 
27.2 Mbytes of cons cells used (68%) 
11.7 Mbytes of vectors used (59%) 
Garbage collection 6 = 0+1+5 (level 2) ... 
27.2 Mbytes of cons cells used (54%) 
17.9 Mbytes of vectors used (66%) 
Garbage collection 7 = 0+1+6 (level 2) ... 
27.2 Mbytes of cons cells used (54%) 
27.2 Mbytes of vectors used (71%) 
Garbage collection 8 = 0+1+7 (level 2) ... 
27.2 Mbytes of cons cells used (54%) 
36.5 Mbytes of vectors used (74%) 
Garbage collection 9 = 0+1+8 (level 2) ... 
27.2 Mbytes of cons cells used (54%) 
49.0 Mbytes of vectors used (76%) 
Garbage collection 10 = 0+1+9 (level 2) ... 
27.4 Mbytes of cons cells used (54%) 
63.5 Mbytes of vectors used (75%) 
Garbage collection 11 = 0+1+10 (level 2) ... 
27.4 Mbytes of cons cells used (54%) 
80.3 Mbytes of vectors used (76%) 
Garbage collection 12 = 0+1+11 (level 2) ... 
27.4 Mbytes of cons cells used (54%) 
102.6 Mbytes of vectors used (78%) 
Garbage collection 13 = 0+1+12 (level 2) ... 
27.4 Mbytes of cons cells used (54%) 
130.4 Mbytes of vectors used (79%) 
Garbage collection 14 = 0+1+13 (level 2) ... 
29.3 Mbytes of cons cells used (58%) 
164.4 Mbytes of vectors used (80%) 
Garbage collection 15 = 0+1+14 (level 2) ... 
33.9 Mbytes of cons cells used (54%) 
204.1 Mbytes of vectors used (80%) 
Garbage collection 16 = 0+1+15 (level 2) ... 
33.9 Mbytes of cons cells used (54%) 
248.8 Mbytes of vectors used (81%) 
Garbage collection 17 = 1+1+15 (level 0) ... 
62.5 Mbytes of cons cells used (100%) 
300.4 Mbytes of vectors used (98%) 
Garbage collection 18 = 1+1+16 (level 2) ... 
62.5 Mbytes of cons cells used (81%) 
298.4 Mbytes of vectors used (81%) 
Garbage collection 19 = 1+1+17 (level 2) ... 
63.2 Mbytes of cons cells used (67%) 
364.6 Mbytes of vectors used (58%) 
Garbage collection 20 = 1+1+18 (level 2) ... 
94.6 Mbytes of cons cells used (82%) 
541.5 Mbytes of vectors used (72%) 
Garbage collection 21 = 1+1+19 (level 2) ... 
115.7 Mbytes of cons cells used (82%) 
562.3 Mbytes of vectors used (62%) 
Garbage collection 22 = 1+1+20 (level 2) ... 
140.9 Mbytes of cons cells used (82%) 
577.8 Mbytes of vectors used (64%) 
Garbage collection 23 = 1+1+21 (level 2) ... 
171.2 Mbytes of cons cells used (82%) 
595.1 Mbytes of vectors used (65%) 
Garbage collection 24 = 1+1+22 (level 2) ... 
207.6 Mbytes of cons cells used (83%) 
615.9 Mbytes of vectors used (68%) 
Garbage collection 25 = 1+1+23 (level 2) ... 
251.3 Mbytes of cons cells used (83%) 
656.9 Mbytes of vectors used (60%) 
Garbage collection 26 = 1+1+24 (level 2) ... 
303.6 Mbytes of cons cells used (83%) 
686.9 Mbytes of vectors used (63%) 
Garbage collection 27 = 1+1+25 (level 2) ... 
366.5 Mbytes of cons cells used (83%) 
722.8 Mbytes of vectors used (66%) 
Garbage collection 28 = 1+1+26 (level 2) ... 
441.9 Mbytes of cons cells used (83%) 
798.1 Mbytes of vectors used (61%) 
Garbage collection 29 = 1+1+27 (level 2) ... 
532.4 Mbytes of cons cells used (83%) 
850.1 Mbytes of vectors used (65%) 
Garbage collection 30 = 1+1+28 (level 2) ... 
641.0 Mbytes of cons cells used (83%) 
912.6 Mbytes of vectors used (70%) 
Garbage collection 31 = 1+1+29 (level 2) ... 
771.4 Mbytes of cons cells used (83%) 
987.8 Mbytes of vectors used (63%) 
Garbage collection 32 = 1+1+30 (level 2) ... 
927.8 Mbytes of cons cells used (83%) 
1141.0 Mbytes of vectors used (60%) 
Garbage collection 33 = 1+1+31 (level 2) ... 
1115.5 Mbytes of cons cells used (83%) 
1248.3 Mbytes of vectors used (66%) 
Garbage collection 34 = 1+1+32 (level 2) ... 
1261.6 Mbytes of cons cells used (78%) 
1885.0 Mbytes of vectors used (83%) 
+0

Versuchen Sie Rscript.exe stattdessen? –

+0

Betreiben Sie Rstudio auf demselben Computer? Haben sie die gleiche Menge an RAM? Es wird nicht einfach sein, Ihnen ohne ein [reproduzierbares Beispiel] zu helfen (http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – MrFlick

+0

Maschine hat 32 GB RAM und der Test war auf der gleichen und einer anderen Maschine. Ich frage mich, ob es einen Unterschied zu Java gibt, wenn CMD Batch gegen RStudio läuft? Ich würde den Code teilen, wenn ich könnte, aber das ist vor jeder Codeausführung, so bezweifle ich, dass es helfen würde. – John

Antwort

0

kein Update für CMD BATCH werden würde, aber A.Webb schlug stattdessen mit RScript. Dies funktioniert, da das Skript jetzt sehr schnell ausgeführt wird, aber die ROut-Datei fehlt.

War C: \ Programme \ R \ R-3.3.2 \ bin \ x64 \ r.exe“CMD BATCH "\ Server-Verzeichnis \ RFilename.R"

Jetzt: C: \ Programme \ R \ 3.3.2 \ bin \ x64 \ RScript.exe "" \ Server-Verzeichnis \ RFilename.R "