pmap

alpine linux: pmap output not showing RSS

橙三吉。 提交于 2019-12-08 06:54:40
问题 I have a docker container running a base image of alpine linux and when I exec into the docker container and run the command: pmap -x [pid] The headers that I see in the output are: Address Kbytes PSS Dirty Swap Mode Mapping I am actually explicitly looking for RSS (Resident Set Size). Why is this header not showing up in the output? 回答1: If pmap does not display it in that particular docker image (Alpine), check if top if more complete in its output (as in this thread): vagrant@dockerdev:

use pmap() to calculate row means of several columns

非 Y 不嫁゛ 提交于 2019-12-06 08:38:04
I'm trying to better understand how pmap() works within dataframes, and I get a surprising result when applying pmap() to compute means from several columns. mtcars %>% mutate(comp_var = pmap_dbl(list(vs, am, cyl), mean)) %>% select(comp_var, vs, am, cyl) In the above example, comp_var is equal to the value of vs in its row, rather than the mean of the three variables in a given row. I know that I could get accurate results for comp_var using ... mtcars %>% rowwise() %>% mutate(comp_var = mean(c(vs, am, cyl))) %>% select(comp_var, vs, am, cyl) %>% ungroup() ... but I want to understand how

purrr::pmap with other default inputs

≡放荡痞女 提交于 2019-12-06 06:35:39
问题 I am wondering how to use pmap() function if I have more than 3 inputs as parameters to map into a function with other default inputs. Here is a reproducible example: a=c(5, 100, 900) b=c(1, 2, 3) ablist=list(mean=a,sd=b) pmap(ablist, ~rnorm( mean=a , sd=b , n = 9)) outputs: [[1]] [1] 5.734723 99.883171 895.962561 5.346905 98.723191 903.373177 4.172267 96.424440 897.437970 [[2]] [1] 4.427977 98.348139 899.287248 4.404674 99.178516 900.983974 3.836353 101.520355 899.992332 [[3]] [1] 4.961772

Julia, run function multiple times, save results in array

风流意气都作罢 提交于 2019-12-05 11:02:33
I am building a microsimulation model in Julia. I have built the structure of my function and it runs great for for 1 "person". I'd like to write the script to run 100000+ people through the model and save the results in one location. Eventually I'd like to execute this in parallel. Below I have included a simple working version of the code with dummy probabilities. using Distributions # Microsim function function MicroSim(start_age, stages) stage = 0 age = start_age # Set all trackers to 0 Death_tracker = 0 Disease_tracker = 0 # While loop while stage <= stages age = age #####################

How many threads does Clojure's pmap function spawn for URL-fetching operations?

荒凉一梦 提交于 2019-12-03 09:27:07
问题 The documentation on the pmap function leaves me wondering how efficient it would be for something like fetching a collection of XML feeds over the web. I have no idea how many concurrent fetch operations pmap would spawn and what the maximum would be. 回答1: If you check the source you see: > (use 'clojure.repl) > (source pmap) (defn pmap "Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result

How many threads does Clojure's pmap function spawn for URL-fetching operations?

ぐ巨炮叔叔 提交于 2019-12-02 22:18:45
The documentation on the pmap function leaves me wondering how efficient it would be for something like fetching a collection of XML feeds over the web. I have no idea how many concurrent fetch operations pmap would spawn and what the maximum would be. If you check the source you see: > (use 'clojure.repl) > (source pmap) (defn pmap "Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result unless required. Only useful for computationally intensive functions where the time of f dominates the

Where do these java native memory allocated from?

自古美人都是妖i 提交于 2019-11-28 11:37:49
JDK version is hotspot 8u_45 I researched native memory of my java process. The native memory even consumes more space than heap. However there are many native memory blocks which confuses me. The result of pmap -x for example: 00007f8128000000 65508 25204 25204 rw--- [ anon ] 00007f812bff9000 28 0 0 ----- [ anon ] 00007f812c000000 65508 24768 24768 rw--- [ anon ] 00007f812fff9000 28 0 0 ----- [ anon ] 00007f8130000000 65508 25532 25532 rw--- [ anon ] 00007f8133ff9000 28 0 0 ----- [ anon ] 00007f8134000000 65524 22764 22764 rw--- [ anon ] 00007f8137ffd000 12 0 0 ----- [ anon ] 00007f8138000000

Trying to locate a leak! What does anon mean for pmap?

北慕城南 提交于 2019-11-28 04:42:58
I'm trying to locate where my memory has gone for a java process running in linux. Someone suggested I use pmap -x to see exactly what the memory is doing. The output is really long but basically a good portion of it is a repeat of this: 00007fbf75f6a000 1016 - - - rwx-- [ anon ] 00007fbf76068000 12 - - - ----- [ anon ] What exactly does this mean? Why do I have so many entries of this (4000+)? Anon blocks are "large" blocks allocated via malloc or mmap -- see the manpages. As such, they have nothing to do with the Java heap (other than the fact that the entire heap should be stored in just

Java process memory usage (jcmd vs pmap)

↘锁芯ラ 提交于 2019-11-27 15:37:55
I have a java application running on Java 8 inside a docker container. The process starts a Jetty 9 server and a web application is being deployed. The following JVM options are passed: -Xms768m -Xmx768m . Recently I noticed that the process consumes a lot of memory: $ ps aux 1 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND app 1 0.1 48.9 5268992 2989492 ? Ssl Sep23 4:47 java -server ... $ pmap -x 1 Address Kbytes RSS Dirty Mode Mapping ... total kB 5280504 2994384 2980776 $ jcmd 1 VM.native_memory summary 1: Native Memory Tracking: Total: reserved=1378791KB, committed=1049931KB - Java

Trying to locate a leak! What does anon mean for pmap?

守給你的承諾、 提交于 2019-11-27 00:37:12
问题 I'm trying to locate where my memory has gone for a java process running in linux. Someone suggested I use pmap -x to see exactly what the memory is doing. The output is really long but basically a good portion of it is a repeat of this: 00007fbf75f6a000 1016 - - - rwx-- [ anon ] 00007fbf76068000 12 - - - ----- [ anon ] What exactly does this mean? Why do I have so many entries of this (4000+)? 回答1: Anon blocks are "large" blocks allocated via malloc or mmap -- see the manpages. As such, they