Skip to main content

linux - Execution time differs for different users




I am running simple R job by root and another limited user. The execution time differs significantly. What can be the source of problem?



Further information



Here is how I compare the run time:



# time /share/binary/R/bin/R CMD BATCH s1n\=50.R

real 0m0.278s

user 0m0.217s
sys 0m0.032s
# su john
$ time /share/binary/R/bin/R CMD BATCH s1n\=50.R


the run under john user takes a long time and never finishes! The output of perf during these interval is:



   PerfTop:     906 irqs/sec  kernel:19.3%  exact:  0.0% [1000Hz cycles],  (all, 8 CPUs)
-------------------------------------------------------------------------------------------------------------------------------------------------------------


samples pcnt function DSO
_______ _____ _____________________________ _______________________________

598.00 14.5% __GI_vfprintf /lib64/libc-2.12.so
194.00 4.7% intel_idle [kernel.kallsyms]
176.00 4.3% read_hpet [kernel.kallsyms]
170.00 4.1% bcEval /usr/local/R/lib64/R/bin/exec/R
141.00 3.4% ___printf_fp /lib64/libc-2.12.so
138.00 3.4% __strchrnul /lib64/libc-2.12.so

121.00 2.9% Rf_cons /usr/local/R/lib64/R/bin/exec/R
120.00 2.9% R_gc_internal /usr/local/R/lib64/R/bin/exec/R
91.00 2.2% _IO_default_xsputn_internal /lib64/libc-2.12.so
88.00 2.1% Rf_allocVector /usr/local/R/lib64/R/bin/exec/R
84.00 2.0% _IO_file_xsputn_internal /lib64/libc-2.12.so
82.00 2.0% scientific /usr/local/R/lib64/R/bin/exec/R
72.00 1.7% MatrixSubset /usr/local/R/lib64/R/bin/exec/R
71.00 1.7% duplicate1 /usr/local/R/lib64/R/bin/exec/R
68.00 1.7% floor /lib64/libm-2.12.so
64.00 1.6% __strcmp_sse42 /lib64/libc-2.12.so

53.00 1.3% Rf_findVarInFrame3 /usr/local/R/lib64/R/bin/exec/R
53.00 1.3% Rf_protect /usr/local/R/lib64/R/bin/exec/R
50.00 1.2% _IO_str_init_static_internal /lib64/libc-2.12.so
50.00 1.2% Rf_eval /usr/local/R/lib64/R/bin/exec/R
43.00 1.0% Rf_formatReal /usr/local/R/lib64/R/bin/exec/R
43.00 1.0% Rf_matchArgs /usr/local/R/lib64/R/bin/exec/R
41.00 1.0% _int_malloc /lib64/libc-2.12.so
36.00 0.9% _itoa_word /lib64/libc-2.12.so
33.00 0.8% __ieee754_log /lib64/libm-2.12.so
31.00 0.8% Rf_EncodeReal /usr/local/R/lib64/R/bin/exec/R

29.00 0.7% Rf_mkPROMISE /usr/local/R/lib64/R/bin/exec/R
29.00 0.7% do_bind /usr/local/R/lib64/R/bin/exec/R
28.00 0.7% Rf_install /usr/local/R/lib64/R/bin/exec/R
27.00 0.7% __vsnprintf /lib64/libc-2.12.so
27.00 0.7% _IO_no_init /lib64/libc-2.12.so
23.00 0.6% _IO_old_init /lib64/libc-2.12.so
22.00 0.5% __GI__nss_files_parse_servent /lib64/libnss_files-2.12.so
22.00 0.5% Rconn_printf /usr/local/R/lib64/R/bin/exec/R
22.00 0.5% finite /lib64/libm-2.12.so
22.00 0.5% findVarLocInFrame /usr/local/R/lib64/R/bin/exec/R

21.00 0.5% Rf_getAttrib /usr/local/R/lib64/R/bin/exec/R


I suspect to ulimit and ``disk quota. After disabling the disk quota, the problem is still exist. Unfortunately, limits are equal underrootandjohn. Here is the output ofulimit -a` (thanks to @Eric DANNIELOU):



# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited

pending signals (-i) 127383
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024

virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
# su john
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 127383
max locked memory (kbytes, -l) 64

max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited



Operating System: CentOS 6.2



HW: Intel Core-i7 16GB RAM



Thank you in advance!


Answer



I'm not sure it will be relevant, but you should really use su - john instead of su john : that way it will invoke a clean login shell. Please check that, doing so, the ulimit -a could now possibly show some relevant differences?




Another thing: use strace -f R instead of strace R so that when it invokes a child process, strace traces that child also and shows exactly where that one hangs.


Comments

Popular posts from this blog

linux - iDRAC6 Virtual Media native library cannot be loaded

When attempting to mount Virtual Media on a iDRAC6 IP KVM session I get the following error: I'm using Ubuntu 9.04 and: $ javaws -version Java(TM) Web Start 1.6.0_16 $ uname -a Linux aud22419-linux 2.6.28-15-generic #51-Ubuntu SMP Mon Aug 31 13:39:06 UTC 2009 x86_64 GNU/Linux $ firefox -version Mozilla Firefox 3.0.14, Copyright (c) 1998 - 2009 mozilla.org On Windows + IE it (unsurprisingly) works. I've just gotten off the phone with the Dell tech support and I was told it is known to work on Linux + Firefox, albeit Ubuntu is not supported (by Dell, that is). Has anyone out there managed to mount virtual media in the same scenario?

hp proliant - Smart Array P822 with HBA Mode?

We get an HP DL360 G8 with an Smart Array P822 controller. On that controller will come a HP StorageWorks D2700 . Does anybody know, that it is possible to run the Smart Array P822 in HBA mode? I found only information about the P410i, who can run HBA. If this is not supported, what you think about the LSI 9207-8e controller? Will this fit good in that setup? The Hardware we get is used but all original from HP. The StorageWorks has 25 x 900 GB SAS 10K disks. Because the disks are not new I would like to use only 22 for raid6, and the rest for spare (I need to see if the disk count is optimal or not for zfs). It would be nice if I'm not stick to SAS in future. As OS I would like to install debian stretch with zfs 0.71 as file system and software raid. I have see that hp has an page for debian to. I would like to use hba mode because it is recommend, that zfs know at most as possible about the disk, and I'm independent from the raid controller. For us zfs have many benefits, ...

linux - Awstats - outputting stats for merged Access_logs only producing stats for one server's log

I've been attempting this for two weeks and I've accessed countless number of sites on this issue and it seems there is something I'm not getting here and I'm at a lost. I manged to figure out how to merge logs from two servers together. (Taking care to only merge the matching domains together) The logs from the first server span from 15 Dec 2012 to 8 April 2014 The logs from the second server span from 2 Mar 2014 to 9 April 2014 I was able to successfully merge them using the logresolvemerge.pl script simply enermerating each log and > out_putting_it_to_file Looking at the two logs from each server the format seems exactly the same. The problem I'm having is producing the stats page for the logs. The command I've boiled it down to is /usr/share/awstats/tools/awstats_buildstaticpages.pl -configdir=/home/User/Documents/conf/ -config=example.com awstatsprog=/usr/share/awstats/wwwroot/cgi-bin/awstats.pl dir=/home/User/Documents/parced -month=all -year=all...