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

James Cameron quozl at laptop.org
Wed Apr 8 21:29:35 EDT 2015


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/


More information about the Sugar-devel mailing list