[R] R-0.65.1 Startup

partha_bagchi@hgsi.com partha_bagchi at hgsi.com
Thu Nov 18 15:25:39 CET 1999


Hello All,
Sorry for not replying earlier as I was out of town without email. Thanks
very much to Thomas Lumley, Brian Ripley, Ray Brownrigg and Guido Masarotto
for their helpful suggestions.
I think I may have found the culprit in this case. I had an .Rdata in the
startup directory which was saved under 0.64.1. (I upgraded from 0.64.1 to
0.65.1). When I move this file away from the working directory, it takes 11
seconds (with a handheld timer) from "double-click" to R prompt. I do not
know why this datafile should be the source of the problem.  I sending this
Rdata file separately to you and not to R-help in general to avoid wasted
bandwidth.

I am also replying to each suggestion below.


Prof. Thomas Lumley wrote:



                                                                                                               
                    Thomas Lumley                                                                              
                    <thomas at biostat.washi        To:     r-help at stat.math.ethz.ch                              
                    ngton.edu>                   cc:                                                           
                    Sent by:                     Subject:     Re: [R] R-0.65.1 Startup                         
                    owner-r-help at stat.mat                                                                      
                    h.ethz.ch                                                                                  
                                                                                                               
                                                                                                               
                    11/12/99 04:18 PM                                                                          
                                                                                                               
                                                                                                               




On Fri, 12 Nov 1999 partha_bagchi at hgsi.com wrote:

> Dear R users,
> I have noticed that my R startup is extremely slow. It takes almost 3
> minutes  from "double-click" to R prompt. I have been running R-0.64.1
till
> recently and it took about 30 sec. I still have access to R-0.64.1. When
I
> started it up, it took about 25 sec. Can anyone tell me if this is a bug
in
> R or a problem with my machine?

I have also noticed a slow startup under Win98 on a reasonably fast
machine. In fact, the startup is not unreasonably slow -- many large
programs take this long to start up. The problem is that there isn't much
indication that something is happening, so I have sometimes assumed I only
clicked once on the icon and tried again, resulting in two or three R
processes.

Perhaps Rgui should display a splash screen while it's loading?

     -thomas




Thomas Lumley
------------------------------------------------------+------
Biostatistics       : "Never attribute to malice what  :
Uni of Washington   :  can be adequately explained by  :
Box 357232          :  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232    :                       :
------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._._

Thanks. Would the startup screen be considered a "splash screen" or are you
thinking something like the Win95 startup screen?

Ray Brownrigg wrote:

Do you realise that --nsize is an item count, not a byte count?  On one
of our Unix systems, the command:
R --vsize 25M --nsize 10M
results in a 229MB process.   That will tax even a 256MB system, since
Windows takes about 64MB (doesn't it?)

So try starting up with somewhat smaller --nsize, I have found --nsize 1M
suits most needs.

Hope this helps,
Ray Brownrigg <ray at mcs.vuw.ac.nz>  http://www.mcs.vuw.ac.nz/~ray

Thanks and I agree with you and will tryout the lower setting for nsize.
However, it does not explain  the behaviour pattern change between 0.64.1
and 0.65.1.

Prof. Brian Ripley wrote:

On Sat, 13 Nov 1999, Ray Brownrigg wrote:

> > Win95 on a 600Mhz Pentium III with 256M RAM (yeah a new machine that I
just
> > got).
> >
> > The R-shortcut setup (which is the same for R-0.64.1) is
> > C:\R\rw0651\bin\Rgui.exe --vsize 25M --nsize 10M
> >
> Do you realise that --nsize is an item count, not a byte count?  On one
> of our Unix systems, the command:
> R --vsize 25M --nsize 10M
> results in a 229MB process.   That will tax even a 256MB system, since
> Windows takes about 64MB (doesn't it?)

Windows 95 takes about 8Mb, and Partha says rw0641 does work. I did the
calculations last night, thought it was marginal, but we had evidence that
rw0641 would succeed. On my own box, running NT with 192Mb of RAM, I can
allocate about 150Mb in about 5 secs (--vsize 25M, --nsize 6M), but trying
to get --nsize 7M took 2 minutes due to paging.

> So try starting up with somewhat smaller --nsize, I have found --nsize 1M
> suits most needs.

Indeed. If you really need more, R will become slow due to the work in
garbage collecting so many small units.

The puzzle becomes why rw0641 works. It did use different memory
allocator, and it is possible that one is faster on Win 9x. (As it leaks
badly, we do not use it any more.)

Thomas Lumley mentioned a splash screen. On my systems the console
appears almost instantly. As it is done so early in the code it would be
impossible to put a splash screen up much earlier. The one thing
that is done before the console is put up is to read the configuration
file.  One common cause of a slow startup is a slow user file system,
as we do have to look for files in the user `home' directory.

--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

Thanks. Prof. Ripley, do you think that having 256Meg of RAM might actually
slow down Win95 rather than speed it up (given all the other strange things
under Win95)?

Guido Masarotto wrote:

On Sat, Nov 13, 1999 at 08:15:25AM +0000, Prof Brian D Ripley wrote:
> The puzzle becomes why rw0641 works. It did use different memory
> allocator, and it is possible that one is faster on Win 9x. (As it leaks
> badly, we do not use it any more.)
>

Partha,
could you provide more details (content of an eventual .RData
file, memory reported by Windows,what happens if you start R from a
new directory,...).
I am really curious about the difference between rw0641 and rw0651.
As Brian reported, we have changed the memory allocator.
But, I am not able to reproduce the differences.
E.g., look to the following (PII 233, RAM 64M , NT4SP5):

-------------------------------------------------------------------------------

[/tmp]% cat quit.R
q()
[/tmp] time /buffer/rw0641/bin/Rterm.exe --vsize 25M --nsize 1M --slave
--no-save < quit.R

real    0m1.703s
user    0m0.020s
sys     0m0.010s
[/tmp] time /buffer/rw0641/bin/Rterm.exe --vsize 25M --nsize 5M --slave
--no-save < quit.R

real    0m31.926s
user    0m0.010s
sys     0m0.050s
[/tmp] time /tmp/rw0651/bin/Rterm.exe --vsize 25M --nsize 1M --slave
--no-save < quit.R

real    0m1.773s
user    0m0.020s
sys     0m0.010s
[/tmp] time /tmp/rw0651/bin/Rterm.exe --vsize 25M --nsize 5M --slave
--no-save < quit.R

real    0m30.224s
user    0m0.030s
sys     0m0.010s
-------------------------------------------------------------------------------


I am not too much confident about 'user' and 'sys' timing. But the 'real'
one
is what I observed (elapsed time, no other process active).

BTW, on the same system, under Linux, I obtain:
------------------------------------------------------------------------------

R-0.64.1
========
[~/tmp]% time  R --vsize 25M --nsize 1M --slave --no-save  < quit.R

real    0m1.345s
user    0m1.130s
sys     0m0.210s
[~/tmp]% time  R --vsize 25M --nsize 5M --slave --no-save  < quit.R

real    0m28.527s
user    0m1.230s
sys     0m2.750s

R-0.90.0 Today snapshot:
========================
[~/tmp]% time  ~/src/R/bin/R  --vsize 25M --nsize 1M --slave --no-save  <
quit.R

real    0m1.286s
user    0m1.060s
sys     0m0.220s
[~/tmp]% time  ~/src/R/bin/R  --vsize 25M --nsize 5M --slave --no-save  <
quit.R

real    0m31.809s
user    0m1.120s
sys     0m1.900s
-----------------------------------------------------------------------------


which shows that degradation in startup time due to an increase in 'nsize'
is more or less the same.

guido


Thanks Guido. I will try to reproduce your results. I see you are using NT.
What is the equivalent method of determining time under Win95?


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list