XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

James Cameron-2
With Sugar 0.98 in 13.2.1, the XO-1 was so short of memory that adding
swap gave an obvious benefit.  Thanks to those who have verified this
for us.

With Sugar 0.104 in 13.2.4, things seem much better on the XO-1,
thanks to all the work done by Sugar Labs developers.  But I'm not
finished testing [1].

Meanwhile, there's an opportunity to add swap to jffs2 filesystem.

The XO-1 NAND Flash is rated for 100,000 writes per cell.  The jffs2
filesystem we use spreads the writes across all the cells.

There's a risk that swapping to the NAND Flash will shorten the life
of an XO-1.  It may become slower at reading and writing journal
entries.  But they might already be so slow that this isn't a problem
any more.

What I need is some data from XO-1 that have been used a lot: how long
does it take to reflash?  To test, surround a copy-nand command with
timing markers, like this:

ok t-sec( copy-nand u:\32014o0.img )t-sec

The result will be on the line above the ok prompt when it is done,
e.g. 403S, which is 403 seconds.  Send me the serial number, file
name, and time in seconds.

Notes:

1.  free memory with no activities running is up around the 40 MB
mark.  Browse running leaves 16 MB free.  Activity startup time is
much reduced, and reduced still further when the pulsing icon
animation is switched from 10 times a second to twice a second.  The
animation is stealing resources!  On the other hand, the spinning
cursor during startup or in Browse consumes no significant resources.

http://dev.laptop.org/~quozl/z/1YdW4T.txt shows the change.

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [Sugar-devel] XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Gonzalo Odiard
SHC8420412 = 332S



On Thu, Apr 2, 2015 at 12:54 AM, James Cameron <[hidden email]> wrote:
With Sugar 0.98 in 13.2.1, the XO-1 was so short of memory that adding
swap gave an obvious benefit.  Thanks to those who have verified this
for us.

With Sugar 0.104 in 13.2.4, things seem much better on the XO-1,
thanks to all the work done by Sugar Labs developers.  But I'm not
finished testing [1].

Meanwhile, there's an opportunity to add swap to jffs2 filesystem.

The XO-1 NAND Flash is rated for 100,000 writes per cell.  The jffs2
filesystem we use spreads the writes across all the cells.

There's a risk that swapping to the NAND Flash will shorten the life
of an XO-1.  It may become slower at reading and writing journal
entries.  But they might already be so slow that this isn't a problem
any more.

What I need is some data from XO-1 that have been used a lot: how long
does it take to reflash?  To test, surround a copy-nand command with
timing markers, like this:

ok t-sec( copy-nand u:\32014o0.img )t-sec

The result will be on the line above the ok prompt when it is done,
e.g. 403S, which is 403 seconds.  Send me the serial number, file
name, and time in seconds.

Notes:

1.  free memory with no activities running is up around the 40 MB
mark.  Browse running leaves 16 MB free.  Activity startup time is
much reduced, and reduced still further when the pulsing icon
animation is switched from 10 times a second to twice a second.  The
animation is stealing resources!  On the other hand, the spinning
cursor during startup or in Browse consumes no significant resources.

http://dev.laptop.org/~quozl/z/1YdW4T.txt shows the change.

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Sugar-devel mailing list
[hidden email]
http://lists.sugarlabs.org/listinfo/sugar-devel



--
Gonzalo Odiard

SugarLabs - Software for children learning 

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [Sugar-devel] XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Gonzalo Odiard
In reply to this post by James Cameron-2
Activity startup time is
much reduced, and reduced still further when the pulsing icon
animation is switched from 10 times a second to twice a second.  The
animation is stealing resources!  On the other hand, the spinning
cursor during startup or in Browse consumes no significant resources.

http://dev.laptop.org/~quozl/z/1YdW4T.txt shows the change.


Hmm, good catch, I will try with different numbers.

Gonzalo


 
--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Sugar-devel mailing list
[hidden email]
http://lists.sugarlabs.org/listinfo/sugar-devel



--
Gonzalo Odiard

SugarLabs - Software for children learning 

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

James Cameron-2
In reply to this post by James Cameron-2
Browse is one of the most heavily used activities when internet or
local content is available.

Tests were run over many hours on several XO-1 laptops.  The XO-1 is
an old design which is slow enough to give useful statistics.

The results show a continued improvement to startup time over the
recent versions of Sugar, and a very small advantage to using swap
memory.

--

The first test was to reboot, wait for Sugar to start, then
automatically start the Browse activity, and time how long it took to
start.  Then the results of hundreds of tests were averaged.

Browse-140 on 12.1.0 with Sugar 0.94 took 25 seconds.

Browse-149.4 on 13.2.1 with Sugar 0.98 took 23 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and no swap took 21 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and NAND swap took 20 seconds.

This shows continued improvement to Browse startup time, in the
scenario where the libraries have to be loaded into memory.

(Reference: test #8, and #9)

--

Another test started and stopped the Browse activity 25 times without
rebooting.  Then the results were averaged.

Browse-140 on 12.1.0 with Sugar 0.94 took 14 seconds.

Browse-149.4 on 13.2.1 with Sugar 0.98 took 15 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and NAND swap took 13 seconds.

This shows some improvement to Browse startup time, in the scenario
where the needed libraries are already loaded into memory.

(Reference: test #6)

--

The same test also started and stopped most of the other activities
25 times without rebooting.  Then the results were averaged.

For Sugar 0.96 the average startup time was 15 seconds the first time,
and 11 seconds each subsequent time.

For Sugar 0.98 the average startup time was 17 seconds the first time,
and 13 seconds each subsequent time.

For Sugar 0.104 the average startup time was 14 seconds the first
time, and 11 seconds each subsequent time.

Detailed results by activity below.  The key for these tables is:

        cold = startup time for first start after sugar restart.
        warm = average of startup time for subsequence starts.
        std = population standard deviation for warm starts.
        ratio = a ratio comparing warm start to cold start times.
        tests = number of warm start tests recorded.

For Sugar 0.96 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  10.595  10.643  0.531  1.005  24
       com.jotaro.ImplodeActivity   6.691   6.486  0.045  0.969  24
       org.laptop.AbiWordActivity  19.474  14.459  0.804  0.743  24
       org.laptop.AcousticMeasure  11.984   7.761  0.045  0.648  24
             org.laptop.Calculate   9.809   9.560  0.065  0.975  24
          org.laptop.HelpActivity  19.487  11.342  0.688  0.582  24
       org.laptop.MeasureActivity  12.478  10.246  0.085  0.821  24
              org.laptop.Memorize  16.229  13.243  0.539  0.816  24
               org.laptop.Oficina  10.421   9.490  0.431  0.911  24
                 org.laptop.Pippy   6.421   6.150  0.050  0.958  24
        org.laptop.RecordActivity  12.563  11.179  0.346  0.890  24
            org.laptop.TamTamMini  16.676  14.414  0.338  0.864  24
           org.laptop.WebActivity  23.335  14.260  0.241  0.611  24
                 tv.alterna.Clock   8.782   8.631  0.067  0.983  24
                 vu.lux.olpc.Maze  11.699   8.731  0.269  0.746  24
                vu.lux.olpc.Speak  15.187  11.460  0.261  0.755  24

For Sugar 0.98 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  12.946  11.039  0.372  0.853  24
       com.jotaro.ImplodeActivity  11.494  11.352  0.499  0.988  24
       org.laptop.AbiWordActivity  26.611  21.501  1.041  0.808  24
       org.laptop.AcousticMeasure  14.865  12.949  0.351  0.871  24
             org.laptop.Calculate  12.063  10.220  0.207  0.847  24
          org.laptop.HelpActivity  18.378  11.101  0.311  0.604  24
       org.laptop.MeasureActivity  19.566  13.791  0.308  0.705  24
              org.laptop.Memorize  20.977  14.462  0.791  0.689  24
               org.laptop.Oficina  14.216  13.948  0.246  0.981  24
                 org.laptop.Pippy  11.793  10.983  0.141  0.931  24
        org.laptop.RecordActivity  18.459  13.165  0.514  0.713  24
         org.laptop.sugar.Jukebox  16.346  11.466  0.292  0.701  24
    org.laptop.sugar.ReadActivity  16.407  13.253  0.597  0.808  24
            org.laptop.TamTamMini  20.218  16.475  0.638  0.815  24
           org.laptop.WebActivity  22.427  14.587  0.329  0.650  24
                 tv.alterna.Clock   9.943   7.377  0.264  0.742  24
                 vu.lux.olpc.Maze  14.243  10.198  0.785  0.716  24
                vu.lux.olpc.Speak  22.032  13.281  1.150  0.603  24

For Sugar 0.104 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  11.928  10.294  0.492  0.863  24
       com.jotaro.ImplodeActivity   9.084   9.017  0.498  0.993  24
       org.laptop.AbiWordActivity  20.868  16.862  0.376  0.808  24
       org.laptop.AcousticMeasure  12.330  10.513  0.137  0.853  24
             org.laptop.Calculate  11.591   9.920  0.120  0.856  24
          org.laptop.HelpActivity  14.654   8.981  0.329  0.613  24
       org.laptop.MeasureActivity  16.381  11.364  0.135  0.694  24
              org.laptop.Memorize  17.961  14.550  0.183  0.810  24
               org.laptop.Oficina  12.231  12.029  0.351  0.983  24
                 org.laptop.Pippy   8.752   8.202  0.128  0.937  24
        org.laptop.RecordActivity  16.956  12.652  0.145  0.746  24
         org.laptop.sugar.Jukebox   9.666   8.986  0.108  0.930  24
    org.laptop.sugar.ReadActivity  11.296  10.477  0.165  0.928  24
            org.laptop.TamTamMini  18.628  14.734  0.576  0.791  24
           org.laptop.WebActivity  19.425  12.527  0.217  0.645  24
                 tv.alterna.Clock  10.061   7.124  0.123  0.708  24
                 vu.lux.olpc.Maze   8.366   8.265  0.120  0.988  24
                vu.lux.olpc.Speak  24.555  12.075  0.208  0.492  24

(Reference: test #6)

--

The testing scripts can be made available if anybody else would like
to replicate the results.

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: [support-gang] XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Tim Moody
Thanks for wrapping your arms around this.

And congratulations to those who made the curve head in the right direction.

-----Original Message-----
From: support-gang [mailto:[hidden email]] On Behalf Of James Cameron
Sent: Tuesday, April 07, 2015 11:47 PM
To: [hidden email]; [hidden email]; [hidden email]
Subject: Re: [support-gang] XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Browse is one of the most heavily used activities when internet or local content is available.

Tests were run over many hours on several XO-1 laptops.  The XO-1 is an old design which is slow enough to give useful statistics.

The results show a continued improvement to startup time over the recent versions of Sugar, and a very small advantage to using swap memory.

--

The first test was to reboot, wait for Sugar to start, then automatically start the Browse activity, and time how long it took to start.  Then the results of hundreds of tests were averaged.

Browse-140 on 12.1.0 with Sugar 0.94 took 25 seconds.

Browse-149.4 on 13.2.1 with Sugar 0.98 took 23 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and no swap took 21 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and NAND swap took 20 seconds.

This shows continued improvement to Browse startup time, in the scenario where the libraries have to be loaded into memory.

(Reference: test #8, and #9)

--

Another test started and stopped the Browse activity 25 times without rebooting.  Then the results were averaged.

Browse-140 on 12.1.0 with Sugar 0.94 took 14 seconds.

Browse-149.4 on 13.2.1 with Sugar 0.98 took 15 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and NAND swap took 13 seconds.

This shows some improvement to Browse startup time, in the scenario where the needed libraries are already loaded into memory.

(Reference: test #6)

--

The same test also started and stopped most of the other activities
25 times without rebooting.  Then the results were averaged.

For Sugar 0.96 the average startup time was 15 seconds the first time, and 11 seconds each subsequent time.

For Sugar 0.98 the average startup time was 17 seconds the first time, and 13 seconds each subsequent time.

For Sugar 0.104 the average startup time was 14 seconds the first time, and 11 seconds each subsequent time.

Detailed results by activity below.  The key for these tables is:

        cold = startup time for first start after sugar restart.
        warm = average of startup time for subsequence starts.
        std = population standard deviation for warm starts.
        ratio = a ratio comparing warm start to cold start times.
        tests = number of warm start tests recorded.

For Sugar 0.96 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  10.595  10.643  0.531  1.005  24
       com.jotaro.ImplodeActivity   6.691   6.486  0.045  0.969  24
       org.laptop.AbiWordActivity  19.474  14.459  0.804  0.743  24
       org.laptop.AcousticMeasure  11.984   7.761  0.045  0.648  24
             org.laptop.Calculate   9.809   9.560  0.065  0.975  24
          org.laptop.HelpActivity  19.487  11.342  0.688  0.582  24
       org.laptop.MeasureActivity  12.478  10.246  0.085  0.821  24
              org.laptop.Memorize  16.229  13.243  0.539  0.816  24
               org.laptop.Oficina  10.421   9.490  0.431  0.911  24
                 org.laptop.Pippy   6.421   6.150  0.050  0.958  24
        org.laptop.RecordActivity  12.563  11.179  0.346  0.890  24
            org.laptop.TamTamMini  16.676  14.414  0.338  0.864  24
           org.laptop.WebActivity  23.335  14.260  0.241  0.611  24
                 tv.alterna.Clock   8.782   8.631  0.067  0.983  24
                 vu.lux.olpc.Maze  11.699   8.731  0.269  0.746  24
                vu.lux.olpc.Speak  15.187  11.460  0.261  0.755  24

For Sugar 0.98 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  12.946  11.039  0.372  0.853  24
       com.jotaro.ImplodeActivity  11.494  11.352  0.499  0.988  24
       org.laptop.AbiWordActivity  26.611  21.501  1.041  0.808  24
       org.laptop.AcousticMeasure  14.865  12.949  0.351  0.871  24
             org.laptop.Calculate  12.063  10.220  0.207  0.847  24
          org.laptop.HelpActivity  18.378  11.101  0.311  0.604  24
       org.laptop.MeasureActivity  19.566  13.791  0.308  0.705  24
              org.laptop.Memorize  20.977  14.462  0.791  0.689  24
               org.laptop.Oficina  14.216  13.948  0.246  0.981  24
                 org.laptop.Pippy  11.793  10.983  0.141  0.931  24
        org.laptop.RecordActivity  18.459  13.165  0.514  0.713  24
         org.laptop.sugar.Jukebox  16.346  11.466  0.292  0.701  24
    org.laptop.sugar.ReadActivity  16.407  13.253  0.597  0.808  24
            org.laptop.TamTamMini  20.218  16.475  0.638  0.815  24
           org.laptop.WebActivity  22.427  14.587  0.329  0.650  24
                 tv.alterna.Clock   9.943   7.377  0.264  0.742  24
                 vu.lux.olpc.Maze  14.243  10.198  0.785  0.716  24
                vu.lux.olpc.Speak  22.032  13.281  1.150  0.603  24

For Sugar 0.104 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  11.928  10.294  0.492  0.863  24
       com.jotaro.ImplodeActivity   9.084   9.017  0.498  0.993  24
       org.laptop.AbiWordActivity  20.868  16.862  0.376  0.808  24
       org.laptop.AcousticMeasure  12.330  10.513  0.137  0.853  24
             org.laptop.Calculate  11.591   9.920  0.120  0.856  24
          org.laptop.HelpActivity  14.654   8.981  0.329  0.613  24
       org.laptop.MeasureActivity  16.381  11.364  0.135  0.694  24
              org.laptop.Memorize  17.961  14.550  0.183  0.810  24
               org.laptop.Oficina  12.231  12.029  0.351  0.983  24
                 org.laptop.Pippy   8.752   8.202  0.128  0.937  24
        org.laptop.RecordActivity  16.956  12.652  0.145  0.746  24
         org.laptop.sugar.Jukebox   9.666   8.986  0.108  0.930  24
    org.laptop.sugar.ReadActivity  11.296  10.477  0.165  0.928  24
            org.laptop.TamTamMini  18.628  14.734  0.576  0.791  24
           org.laptop.WebActivity  19.425  12.527  0.217  0.645  24
                 tv.alterna.Clock  10.061   7.124  0.123  0.708  24
                 vu.lux.olpc.Maze   8.366   8.265  0.120  0.988  24
                vu.lux.olpc.Speak  24.555  12.075  0.208  0.492  24

(Reference: test #6)

--

The testing scripts can be made available if anybody else would like to replicate the results.

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
support-gang mailing list
[hidden email]
http://lists.laptop.org/listinfo/support-gang
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [Sugar-devel] XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Sebastian Silva-2
In reply to this post by James Cameron-2

On 07/04/15 22:47, James Cameron wrote:
> The testing scripts can be made available if anybody else would like
> to replicate the results.

I'd be curious to look at your scripts and try to replicate some results
with our builds.

Thanks a lot for your detailed tests!

Sebastian
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [Sugar-devel] XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

James Cameron-2
On Tue, Apr 07, 2015 at 11:32:00PM -0500, Sebastian Silva wrote:
>
> On 07/04/15 22:47, James Cameron wrote:
> > The testing scripts can be made available if anybody else would
> > like to replicate the results.
>
> I'd be curious to look at your scripts and try to replicate some
> results with our builds.

git clone git://dev.laptop.org/users/quozl/test-startup-time.git

Look at the file HOWTO.

Somewhat unfinished work.  Do ask any questions you may have.

> Thanks a lot for your detailed tests!

No worries.

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [Sugar-devel] XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Peter Robinson
>> On 07/04/15 22:47, James Cameron wrote:
>> > The testing scripts can be made available if anybody else would
>> > like to replicate the results.
>>
>> I'd be curious to look at your scripts and try to replicate some
>> results with our builds.
>
> git clone git://dev.laptop.org/users/quozl/test-startup-time.git
>
> Look at the file HOWTO.
>
> Somewhat unfinished work.  Do ask any questions you may have.
>
>> Thanks a lot for your detailed tests!
>
> No worries.

Interesting details! I'd be interested to see if porting Browse to the
newer webkit 2 and what effect the perf improvements there would offer
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

James Cameron-2
What benefit is an SD card on an XO-1?

My tests of about 400 starts show some benefit of using an SD card, on
activity startup time.  The benefits are:

- boot time was decreased by several seconds; because of reduced
  demand for memory,

- first activity start after boot was decreased by several seconds;
  because of reduced demand for memory,

- when there is no contention for memory, mean cold activity startup
  time is decreased by between 1 and 2 seconds; because of both
  different data rates and no decompression, and;

- writing journal entries is slightly faster.

There was no benefit on activity startup time where caches were warm;
everything needed by the activity was already in memory, so there was
no extra wait.

The SD card was a SanDisk Ultra 8GB, class 10, 30 MB/s.  Sequential
read speed on a modern desktop is 18.5 MB/s.  But on the XO-1 the
speed is 6.3 MB/s.  There may be little advantage to using a faster
card.

For Sugar 0.104 comparing results by activity, between NAND flash and
SD card:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  11.928  10.294  0.492  0.863  24
             com.garycmartin.Moon  11.809  10.585  0.516  0.896  24  sd
       com.jotaro.ImplodeActivity   9.084   9.017  0.498  0.993  24
       com.jotaro.ImplodeActivity   9.560   8.904  0.501  0.931  24  sd
       org.laptop.AbiWordActivity  20.868  16.862  0.376  0.808  24
       org.laptop.AbiWordActivity  19.326  16.441  0.277  0.851  24  sd
       org.laptop.AcousticMeasure  12.330  10.513  0.137  0.853  24
       org.laptop.AcousticMeasure  11.854  10.552  0.254  0.890  24  sd
             org.laptop.Calculate  11.591   9.920  0.120  0.856  24
             org.laptop.Calculate  12.152   9.975  0.205  0.821  24  sd
          org.laptop.HelpActivity  14.654   8.981  0.329  0.613  24
          org.laptop.HelpActivity  13.025   9.027  0.345  0.693  24  sd
       org.laptop.MeasureActivity  16.381  11.364  0.135  0.694  24
       org.laptop.MeasureActivity  15.000  11.634  0.344  0.776  24  sd
              org.laptop.Memorize  17.961  14.550  0.183  0.810  24
              org.laptop.Memorize  16.442  14.724  0.240  0.896  24  sd
               org.laptop.Oficina  12.231  12.029  0.351  0.983  24
               org.laptop.Oficina  13.250  12.270  0.585  0.926  24  sd
                 org.laptop.Pippy   8.752   8.202  0.128  0.937  24
                 org.laptop.Pippy   9.897   8.404  0.467  0.849  24  sd
        org.laptop.RecordActivity  16.956  12.652  0.145  0.746  24
        org.laptop.RecordActivity  15.341  12.501  0.255  0.815  24  sd
         org.laptop.sugar.Jukebox   9.666   8.986  0.108  0.930  24
         org.laptop.sugar.Jukebox   9.821   9.287  0.472  0.946  24  sd
    org.laptop.sugar.ReadActivity  11.296  10.477  0.165  0.928  24
    org.laptop.sugar.ReadActivity  11.080  10.618  0.463  0.958  24  sd
            org.laptop.TamTamMini  18.628  14.734  0.576  0.791  24
            org.laptop.TamTamMini  19.838  14.615  0.288  0.737  24  sd
           org.laptop.WebActivity  19.425  12.527  0.217  0.645  24
           org.laptop.WebActivity  17.935  12.937  0.274  0.721  24  sd
                 tv.alterna.Clock  10.061   7.124  0.123  0.708  24
                 tv.alterna.Clock  21.226   7.522  0.316  0.354  24  sd ?
                 vu.lux.olpc.Maze   8.366   8.265  0.120  0.988  24
                 vu.lux.olpc.Maze   8.998   8.646  0.370  0.961  24  sd
                vu.lux.olpc.Speak  24.555  12.075  0.208  0.492  24     ?
                vu.lux.olpc.Speak  16.526  11.946  0.358  0.723  24  sd

The cold results for Clock and Speak are unexpected, but this may be
related to gst-plugin-scan.

(Reference: test #6, vs #10)

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Kevin Gordon Gmail
Perhaps silly Q...

Any benefit just putting swap and static content on the SD?

Kg

Sent from my currently functioning gadget 
  Original Message  
From: James Cameron
Sent: Wednesday, April 8, 2015 19:31
To: [hidden email]; [hidden email]; [hidden email]
Subject: Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

What benefit is an SD card on an XO-1?

My tests of about 400 starts show some benefit of using an SD card, on
activity startup time. The benefits are:

- boot time was decreased by several seconds; because of reduced
demand for memory,

- first activity start after boot was decreased by several seconds;
because of reduced demand for memory,

- when there is no contention for memory, mean cold activity startup
time is decreased by between 1 and 2 seconds; because of both
different data rates and no decompression, and;

- writing journal entries is slightly faster.

There was no benefit on activity startup time where caches were warm;
everything needed by the activity was already in memory, so there was
no extra wait.

The SD card was a SanDisk Ultra 8GB, class 10, 30 MB/s. Sequential
read speed on a modern desktop is 18.5 MB/s. But on the XO-1 the
speed is 6.3 MB/s. There may be little advantage to using a faster
card.

For Sugar 0.104 comparing results by activity, between NAND flash and
SD card:

bundle_id cold warm std ratio tests

com.garycmartin.Moon 11.928 10.294 0.492 0.863 24
com.garycmartin.Moon 11.809 10.585 0.516 0.896 24 sd
com.jotaro.ImplodeActivity 9.084 9.017 0.498 0.993 24
com.jotaro.ImplodeActivity 9.560 8.904 0.501 0.931 24 sd
org.laptop.AbiWordActivity 20.868 16.862 0.376 0.808 24
org.laptop.AbiWordActivity 19.326 16.441 0.277 0.851 24 sd
org.laptop.AcousticMeasure 12.330 10.513 0.137 0.853 24
org.laptop.AcousticMeasure 11.854 10.552 0.254 0.890 24 sd
org.laptop.Calculate 11.591 9.920 0.120 0.856 24
org.laptop.Calculate 12.152 9.975 0.205 0.821 24 sd
org.laptop.HelpActivity 14.654 8.981 0.329 0.613 24
org.laptop.HelpActivity 13.025 9.027 0.345 0.693 24 sd
org.laptop.MeasureActivity 16.381 11.364 0.135 0.694 24
org.laptop.MeasureActivity 15.000 11.634 0.344 0.776 24 sd
org.laptop.Memorize 17.961 14.550 0.183 0.810 24
org.laptop.Memorize 16.442 14.724 0.240 0.896 24 sd
org.laptop.Oficina 12.231 12.029 0.351 0.983 24
org.laptop.Oficina 13.250 12.270 0.585 0.926 24 sd
org.laptop.Pippy 8.752 8.202 0.128 0.937 24
org.laptop.Pippy 9.897 8.404 0.467 0.849 24 sd
org.laptop.RecordActivity 16.956 12.652 0.145 0.746 24
org.laptop.RecordActivity 15.341 12.501 0.255 0.815 24 sd
org.laptop.sugar.Jukebox 9.666 8.986 0.108 0.930 24
org.laptop.sugar.Jukebox 9.821 9.287 0.472 0.946 24 sd
org.laptop.sugar.ReadActivity 11.296 10.477 0.165 0.928 24
org.laptop.sugar.ReadActivity 11.080 10.618 0.463 0.958 24 sd
org.laptop.TamTamMini 18.628 14.734 0.576 0.791 24
org.laptop.TamTamMini 19.838 14.615 0.288 0.737 24 sd
org.laptop.WebActivity 19.425 12.527 0.217 0.645 24
org.laptop.WebActivity 17.935 12.937 0.274 0.721 24 sd
tv.alterna.Clock 10.061 7.124 0.123 0.708 24
tv.alterna.Clock 21.226 7.522 0.316 0.354 24 sd ?
vu.lux.olpc.Maze 8.366 8.265 0.120 0.988 24
vu.lux.olpc.Maze 8.998 8.646 0.370 0.961 24 sd
vu.lux.olpc.Speak 24.555 12.075 0.208 0.492 24 ?
vu.lux.olpc.Speak 16.526 11.946 0.358 0.723 24 sd

The cold results for Clock and Speak are unexpected, but this may be
related to gst-plugin-scan.

(Reference: test #6, vs #10)

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

James Cameron-2
On Wed, Apr 08, 2015 at 07:35:34PM -0400, Kevin Gordon Gmail wrote:
> Perhaps silly Q...
>
> Any benefit just putting swap and static content on the SD?

No question is silly.  ;-)

I'm guessing you are asking about performance, or response times.  If
so, the short answer is no.  Details below.

If you are looking for benefits other than performance, the main
benefit is total size.  NAND flash is only 1 GB.  By adding an 128 GB
SD card, the total content stored on the XO-1 can increase
dramatically.

--

Details #1

It has to do with when data moves, and how much concurrency occurs.

A counter question is ... when is it that the XO-1 will both read from
NAND flash _and_ from SD card at the same time?  Probably never.

Data that moves from NAND flash to memory happens during Sugar
startup, and the first time an activity is started.  It can also
happen if a different activity is started.  Once an activity is
started, usually no further demand occurs.

Memory data that moves to swap does so because it isn't being used.
In my tests of Sugar 0.104 on Fedora 18, about 12 MB of data moves to
swap, and no more.  This happens during Sugar startup, and the first
activity startup, then it doesn't happen any more until the next
reboot.  This data generally does not return from swap.

So with swap on SD card, it only benefits during Sugar startup and
first activity startup, and before content is accessed.

Content data, such as videos, web pages, audio, images, and so on, is
accessed after the Browse activity has started.

So with content on SD card, there should be no significant difference.

While the system is capable of much more concurrency (see below),
Sugar and the activities just don't make that demand.

You could test it by timing how long before content is visible.

--

Details #2

Proof the NAND flash and SD card do not block each other.

The camera, SD card reader slot, and NAND flash all hang off the CAFE
ASIC which presents through a PCI bus to the CPU.

Does filling the data channel to one device block the other device in
any way?

Read test from NAND flash yields about 8 MB/s.

When the SD card is doing a read test, a simultaneous read test from
NAND flash yields about 5.8 MB/s.  The decrease is due to contention for
CPU and bus.  At the same time, the SD card read test result is mostly
unchanged, falling from 6.9 MB/s to 6.6 MB/s.

Read from filesystem cache of NAND flash yields about 45 MB/s.

When the SD card is doing a read test, a read from filesystem cache of
NAND flash yields about 32 MB/s.  The decrease is due to contention
for CPU and bus.  At the same time, the SD card read test result is
mostly unchanged, falling from 6.9 MB/s to 6.7 MB/s.

This means the bus path to the SD card is mostly idle, and the kernel
is waiting for the SD card to respond.

So the CAFE ASIC and PCI bus are easily able to handle an aggregate of
about 12.4 MB/s, and perhaps much more.

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

James Cameron-2
In reply to this post by James Cameron-2
On Wed, Apr 08, 2015 at 09:19:14PM -0400, Nathan C. Riddle wrote:
> Can I rephrase the question:
> Put /home and swap on SD.

That might help, for particularly large activities.

> I believe previous posts here have indicated that SD to RAM is not
> the slowest step. This has always been a debate in my mind.  The SD
> simpler in the field.  My 16 GB SD occasionally hangs on boot when
> used with USB to ethernet adapter on battery -- suspect power demand
> issue.

No, it might not be power demand, it is more likely to be timing.

To check, make sure the laptop is unlocked, and add this to the second
line of the boot/olpc.fth file:

    dev /sd  patch 2drop cb! sdhci-card-power-off  dend

This will prevent the firmware from turning off the card reader before
booting Linux.  The card reader will stay powered on.

A 16 GB SD card is modern.  It draws less current than the cards for
which the XO-1 was designed.  The XO-1 SD card reader doesn't have
discharge clamps on the power rails.

When a USB ethernet adapter is present, the firmware takes longer to
probe the USB bus controller.  When on battery, the firmware may take
longer to probe the embedded controller.

The combined effect is to change the timing of power on and power off
events for the card.  Cards are known to be confused if the voltage
does not fall fast enough, and without discharge clamps and with a
modern card, this is more likely.

"occasionally hangs" means you're right on the border of it working or
not.

(p.s. there is some old code around that tries to patch
card-power-off, most recently seen in Jhon Diaz' repost of the Puppy
Linux olpc.fth ... but since card-power-off is now a defer, it doesn't
patch.)

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Lionel Laské-2
In reply to this post by James Cameron-2

Very nice job James.
Thanks to give us these details. 
Numbers give sometimes more than tons of words !

           Lionel.

2015-04-08 18:00 GMT+02:00 <[hidden email]>:

Date: Wed, 8 Apr 2015 13:47:27 +1000
From: James Cameron <[hidden email]>
To: [hidden email], [hidden email],
        [hidden email]
Subject: Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=us-ascii

Browse is one of the most heavily used activities when internet or
local content is available.

Tests were run over many hours on several XO-1 laptops.  The XO-1 is
an old design which is slow enough to give useful statistics.

The results show a continued improvement to startup time over the
recent versions of Sugar, and a very small advantage to using swap
memory.

--

The first test was to reboot, wait for Sugar to start, then
automatically start the Browse activity, and time how long it took to
start.  Then the results of hundreds of tests were averaged.

Browse-140 on 12.1.0 with Sugar 0.94 took 25 seconds.

Browse-149.4 on 13.2.1 with Sugar 0.98 took 23 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and no swap took 21 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and NAND swap took 20 seconds.

This shows continued improvement to Browse startup time, in the
scenario where the libraries have to be loaded into memory.

(Reference: test #8, and #9)

--

Another test started and stopped the Browse activity 25 times without
rebooting.  Then the results were averaged.

Browse-140 on 12.1.0 with Sugar 0.94 took 14 seconds.

Browse-149.4 on 13.2.1 with Sugar 0.98 took 15 seconds.

Browse-157 on 13.2.4 with Sugar 0.104 and NAND swap took 13 seconds.

This shows some improvement to Browse startup time, in the scenario
where the needed libraries are already loaded into memory.

(Reference: test #6)

--

The same test also started and stopped most of the other activities
25 times without rebooting.  Then the results were averaged.

For Sugar 0.96 the average startup time was 15 seconds the first time,
and 11 seconds each subsequent time.

For Sugar 0.98 the average startup time was 17 seconds the first time,
and 13 seconds each subsequent time.

For Sugar 0.104 the average startup time was 14 seconds the first
time, and 11 seconds each subsequent time.

Detailed results by activity below.  The key for these tables is:

        cold = startup time for first start after sugar restart.
        warm = average of startup time for subsequence starts.
        std = population standard deviation for warm starts.
        ratio = a ratio comparing warm start to cold start times.
        tests = number of warm start tests recorded.

For Sugar 0.96 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  10.595  10.643  0.531  1.005  24
       com.jotaro.ImplodeActivity   6.691   6.486  0.045  0.969  24
       org.laptop.AbiWordActivity  19.474  14.459  0.804  0.743  24
       org.laptop.AcousticMeasure  11.984   7.761  0.045  0.648  24
             org.laptop.Calculate   9.809   9.560  0.065  0.975  24
          org.laptop.HelpActivity  19.487  11.342  0.688  0.582  24
       org.laptop.MeasureActivity  12.478  10.246  0.085  0.821  24
              org.laptop.Memorize  16.229  13.243  0.539  0.816  24
               org.laptop.Oficina  10.421   9.490  0.431  0.911  24
                 org.laptop.Pippy   6.421   6.150  0.050  0.958  24
        org.laptop.RecordActivity  12.563  11.179  0.346  0.890  24
            org.laptop.TamTamMini  16.676  14.414  0.338  0.864  24
           org.laptop.WebActivity  23.335  14.260  0.241  0.611  24
                 tv.alterna.Clock   8.782   8.631  0.067  0.983  24
                 vu.lux.olpc.Maze  11.699   8.731  0.269  0.746  24
                vu.lux.olpc.Speak  15.187  11.460  0.261  0.755  24

For Sugar 0.98 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  12.946  11.039  0.372  0.853  24
       com.jotaro.ImplodeActivity  11.494  11.352  0.499  0.988  24
       org.laptop.AbiWordActivity  26.611  21.501  1.041  0.808  24
       org.laptop.AcousticMeasure  14.865  12.949  0.351  0.871  24
             org.laptop.Calculate  12.063  10.220  0.207  0.847  24
          org.laptop.HelpActivity  18.378  11.101  0.311  0.604  24
       org.laptop.MeasureActivity  19.566  13.791  0.308  0.705  24
              org.laptop.Memorize  20.977  14.462  0.791  0.689  24
               org.laptop.Oficina  14.216  13.948  0.246  0.981  24
                 org.laptop.Pippy  11.793  10.983  0.141  0.931  24
        org.laptop.RecordActivity  18.459  13.165  0.514  0.713  24
         org.laptop.sugar.Jukebox  16.346  11.466  0.292  0.701  24
    org.laptop.sugar.ReadActivity  16.407  13.253  0.597  0.808  24
            org.laptop.TamTamMini  20.218  16.475  0.638  0.815  24
           org.laptop.WebActivity  22.427  14.587  0.329  0.650  24
                 tv.alterna.Clock   9.943   7.377  0.264  0.742  24
                 vu.lux.olpc.Maze  14.243  10.198  0.785  0.716  24
                vu.lux.olpc.Speak  22.032  13.281  1.150  0.603  24

For Sugar 0.104 the results by activity were:

                        bundle_id    cold    warm    std  ratio  tests

             com.garycmartin.Moon  11.928  10.294  0.492  0.863  24
       com.jotaro.ImplodeActivity   9.084   9.017  0.498  0.993  24
       org.laptop.AbiWordActivity  20.868  16.862  0.376  0.808  24
       org.laptop.AcousticMeasure  12.330  10.513  0.137  0.853  24
             org.laptop.Calculate  11.591   9.920  0.120  0.856  24
          org.laptop.HelpActivity  14.654   8.981  0.329  0.613  24
       org.laptop.MeasureActivity  16.381  11.364  0.135  0.694  24
              org.laptop.Memorize  17.961  14.550  0.183  0.810  24
               org.laptop.Oficina  12.231  12.029  0.351  0.983  24
                 org.laptop.Pippy   8.752   8.202  0.128  0.937  24
        org.laptop.RecordActivity  16.956  12.652  0.145  0.746  24
         org.laptop.sugar.Jukebox   9.666   8.986  0.108  0.930  24
    org.laptop.sugar.ReadActivity  11.296  10.477  0.165  0.928  24
            org.laptop.TamTamMini  18.628  14.734  0.576  0.791  24
           org.laptop.WebActivity  19.425  12.527  0.217  0.645  24
                 tv.alterna.Clock  10.061   7.124  0.123  0.708  24
                 vu.lux.olpc.Maze   8.366   8.265  0.120  0.988  24
                vu.lux.olpc.Speak  24.555  12.075  0.208  0.492  24

(Reference: test #6)

--

The testing scripts can be made available if anybody else would like
to replicate the results.

--
James Cameron
http://quozl.linux.org.au/


_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [support-gang] XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

Yioryos Asprobounitis
In reply to this post by James Cameron-2


>
> To check, make sure the laptop is unlocked, and add this to the second
> line of the boot/olpc.fth file:
>
>     dev /sd  patch 2drop cb! sdhci-card-power-off  dend
>


Does this keep the SD slot powered only when is occupied or regardless?
Does the OS takes over the SD slot power management after boot?
If not, can OFW detect the presence of an external SDcard early, and keep it powered only then
or detect its absence latter in the boot sequence and revert?
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: XO-1 vs Sugar 0.104 performance, and swap to NAND Flash

James Cameron-2
On Mon, Apr 13, 2015 at 05:56:22AM +0000, Yioryos Asprobounitis wrote:
> James wrote:
> > To check, make sure the laptop is unlocked, and add this to the
> > second line of the boot/olpc.fth file:
> >
> >     dev /sd  patch 2drop cb! sdhci-card-power-off  dend
>
> Does this keep the SD slot powered only when is occupied or
> regardless?

Regardless, but only if the slot is powered up for access.

> Does the OS takes over the SD slot power management after boot?

Yes.  The firmware driver is not used by the kernel.

> If not, can OFW detect the presence of an external SDcard early, and
> keep it powered only then or detect its absence latter in the boot
> sequence and revert?

Not answered.

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel