Even When Not Using a Database, You Are Still Using a Database

Recently, we’ve focused considerable development effort on improving database performance for embedded devices, specifically for Android. This is because Android is a particularly database-centric environment.

On an Android platform, each application is equipped with its own SQLite database. Data stored here is accessible by any class in the application, but not by outside applications. The database is entirely self-contained and server-less, while still being transactional and still using the standard SQL language for executing queries. With this approach, a crash in one application (the dreaded “force close” message) will not affect the data store of any other application. While fantastic for protection, this method is quite often implemented on flash media, which was designed for large sequential reads and writes.

For years, benchmarks have touted the pure performance of a drive through large sequential reads and writes. On managed flash media, the firmware programmers have responded by optimizing for this use case – at the expense of the random I/O used by most databases, including SQLite. Another challenge is the very high ratio of flushes performed by the database (sometimes 1:1). The majority of database writes are not done on sector boundaries – especially problematic for flash media which must write an entire block.

While there are a few unified “flash file systems” for Linux such as YAFFS and JFFS2, designed specifically for flash memory, they have fallen out of favor because they do not plug neatly into the standard software stack, and therefore cannot take advantage of standard Linux features such as the system cache. While traditional file systems such as VFAT and Ext2/3/4 can work with flash, they are not designed with that purpose in mind, and therefore their performance and reliability suffers. For example, discard support has largely been tacked onto Linux file systems, and is still considered to be somewhat experimental. To quote the Linux v3.5 Ext4 documentation, discard support is “off by default until sufficient testing has been done.” Another example: file systems on flash memory typically benefit from using a copy-on-write design, which ext4 does not use. The reality is that most file systems are designed for desktop (and often server) environments, where high resource usage is OK, and power-loss is infrequent.

Our solution to improving database performance on flash memory is to provide a more unified solution where the various pieces of the stack work in a cohesive fashion. Furthermore, the solution is specifically designed for embedded systems using flash memory, where power-loss is a common event. Datalight’s Reliance Nitro file system is a transactional, copy-on-write file system, designed from the ground up to support flash memory discards and power-loss safe operations.

The result of our work in this area is FlashFXe, a new Datalight product built on our many years of experience managing raw NAND, but designed for eMMC. When used together with Reliance Nitro, almost all write operations become sequential and aligned on sector boundaries for the highest performance. Internal operations are more efficiently organized for the copy-on-write nature of flash media. A multi-tiered approach allows small random writes with very frequent flushes to be efficiently handled while maintaining power-loss safe operations.

This month at Embedded World, we will be demonstrating the results of our efforts to improve database performance on embedded devices using Android. Prepare to be impressed!

Learn more about FlashFXe

Thom Denholm | February 12, 2013 | Datalight Products, Flash File System, Performance

Datalight Outperforms Other Linux Flash File Systems

It’s always gratifying when you run benchmarks and discover your product actually does outperform the competition. Months and months of development effort went in to making Reliance Nitro and FlashFX Tera run flawlessly in an open source environment. We were pretty sure our transactional architecture beat the pants off YAFFS2, JFFS2, and UBIFS, but until you run the final benchmarks, you really don’t know for certain. Recently we ran tests on two platforms, a ConnectCore Wi-i.MX51 (Cortex-A8) and an NVidia Tegra 2 (Cortex ARM9). The Flash part used for all tests was a Samsung 512 MB part. The specific test used was IOZone, with a specified file size sufficient to be larger than the Linux cache, in order to better reflect the raw throughput. The results speak for themselves:

Also see an article weighing the pros and cons of JFFS2

Michele Pike | July 15, 2011 | Flash File System, Flash Memory Manager

Reliability on Windows CE 6.0

Watch Rob Hart demonstrating the Datalight flash file system on the Beagle Board with Windows CE 6.0

Michele Pike | October 1, 2009 | Flash File System, Performance, Reliability

Reliance and Reliance Nitro

Ever since we announced our high performance file system Reliance Nitro, we have been getting questions on how it compares to the original Reliance file system. Below is a quick-reference table noting some of the differences between the two. For a more detailed comparison (including performance benchmarks), please contact us.

Attributes Reliance Reliance Nitro Recommendation
High performance on large number of files  (100+) If your device stores a large number of files in a single directory, Nitro will perform much faster than Reliance.
High performance on large files Nitro’s extent based design allows it to perform faster on larger files. For sake of this comparison, files can be considered large if they are 10+ times the block size of the device
Frequent transaction points Nitro introduces a new structure called Delta transactions which speed up the time taken to conduct transaction points. Depending on how often you conduct transactions points, Nitro can provide significant advantage
Random I/O performance most critical Reliance’s block based design provides an advantage on random I/O on small files. On large files both Reliance and Nitro perform equally well on this metric
Sequential I/O  performance most critical Nitro outperforms Reliance on sequential I/O due to its extent based design
Support for Windows Mobile FlashFX Pro 4.0 for Windows Mobile enables a new discard interface that allows Nitro to have much faster write speeds on flash memory
File-size limit 32-bit 64-bit Nitro uses 64-bit variables for file size limits allowing for very large file sizes.
Read-only version Reliance currently provides a read-only version called Reliance Reader. Nitro currently does not provide a reader application – this is scheduled for v2

Michele Pike | July 20, 2009 | Datalight Products, Flash File System, Flash Memory

I HEART Reliance Nitro

With the release of our new file system this week, Reliance Nitro, we asked our Account Managers what they liked most about our new product. Their answers of course included reliability and high performance. Wes Johns and Phillip Allison were so excited they decided to make a video…  watch the youtube video

Michele Pike | June 22, 2009 | Datalight Products, Flash File System, Performance, Reliability

Reliance Nitro Demo Video

We’re totally psyched about Reliance Nitro, our newest file system (yes, we’re file geeks), and we’re always on the lookout for opportunities to show off the performance and reliability attributes it adds to Windows Mobile and Windows CE. When we discovered the relatively-new Beagle Board, it occurred to us that a small, low-cost platform might be just the thing to demonstrate Nitro’s amazing benefits. As you’ve probably heard, the Beagle is making waves with its low cost (around $150) and diminutive size. It uses an OMAP 3530 processor and 256MB of NAND. Though they are most commonly used with Linux, we lucked out in having a partner (MPC Data) who has already developed a Windows CE BSP for it. After a few phone calls, the wizards at MPC Data were able to develop a slick video playback demo app, and presto, the Reliance Nitro Beagle Demo was born! Amateur videographers that we are (ok, REALLY amateur), we recently videotaped John Burnham, who has been working on this project on the Datalight side (and who is a really good sport, btw) showing what happens when power is interrupted during a file write and the extra reliability factor of Reliance Nitro on Windows CE. Be sure to check it out here.

Michele Pike | May 21, 2009 | Datalight Products, Flash File System, Flash Memory, Performance, Reliability

Durability: The Next Killer App

Sea Change Hits Consumer Electronics as Customers Demand Long-term Value

For the first time in more than a decade, people are saving again. In 2007 and years prior, the savings rate hovered around zero as we maxed our credit cards and lines of credit, driving the savings rate into the red and giving the world’s manufacturing base an almost unbelievable boom. In January 2009 though, something unexpected happened; the US savings rate suddenly moved above 5%, the highest in decades. As news of our cloudy economic picture has emerged, consumer behavior is shifting away from status-seeking luxury purchases toward more value-based buying patterns, forcing manufacturers around the world to take notice. And after decades of excess, the shift to thrift is looking like a lasting trend.

But what does this mean for Embedded? As consumers focus on needs over wants, they will increasingly seek out products that are proven durable and reliable.

This will have broad implications for manufacturers of everything from cars to clothing, refrigerators to embedded devices. Today’s consumers are choosing efficiency, durability and value over gee-whiz gadgetry. Consumer mobile OEMs too must focus on delivering value and fewer, more targeted features. Rather than packing devices full of a laundry list of apps and expensive hardware, this means streamlined offerings and more segmented products, while making sure the consumer doesn’t feel like they’re missing out. Motorola’s new EM330 is a prime example of this kind of pared-down, demographic-specific approach. The phone, called the MOTOROKR STAR is marketed specifically toward music lovers, offering a basic clamshell with music recognition software and download-on-the-go at a price point in the sub-$200 range.

As OEMs scramble to add value and enhance their reputations for durability and reliability, Datalight responds with products that support those goals. The combination of flexible flash management that lowers bill of material costs, wear-leveling algorithms extend flash life by several times, and the rock-solid reliability of our file system become essential components of a strategy to provide value to customers.

Many have remarked that markets are driven by a combination of fear and greed. Though the pendulum has recently taken a dramatic –and we believe temporary– move in the direction of fear, ultimately we know a move away from excess is good for all of us and good for the world we live in. Here’s hoping the trend toward value and quality is a long-lasting one.

Michele Pike | March 25, 2009 | Cost Savings, Extended Flash Life, Flash Industry Info, Flash Memory Manager, Performance, Reliability

File System Tuning using Dynamic Transaction Point Technology

Datalight Reliance includes unique technology called Dynamic Transaction Point ™ which provides the flexibility and control device manufacturers need to tune the performance of their device. It enables multiple configurations that can run simultaneously to provide scenario-specific performance optimization. To highlight this technology, we have added a section to Datalight’s website to describe some common embedded devices and the corresponding file system tuning attributes for each of them

www.datalight.com/filesystemtuning

Michele Pike | | Flash File System

Datalight Flash File System Boosts Performance for Devices Built with MontaVista Linux

Bothell, Wash., – August 12, 2008 – Datalight announced today that it has released new versions of Reliance™ and FlashFX® Pro, with pre-configured support for  MontaVista® Linux®. The new install experience includes simplified integration within MontaVista DevRocket, an Eclipse-based IDE that streamlines common embedded  development tasks. Dropped into DevRocket, Datalight products build as kernel loadable modules that work with a project’s OS image. Sample bootstrap code is also  supplied for developers who need to integrate the products into a boot loader.

“Developers choose MontaVista Linux for faster time-to-market, integration, and stable, fully tested code. We are pleased that Datalight has extended these benefits at  the flash memory file system level, and to provide embedded Linux developers with added performance and reliability,” said Dan Cauchy, Senior Director of Market Development, MontaVista Software.

Other upgrades include a read-only version of Reliance inside the Datalight Loader. This small footprint version permits a bootloader to load an OS image directly from a reliance partition. Devices benefit from risk-free “in-place OS upgrades” enabled by the application-controlled transaction point feature of Reliance. The new versions also feature enhancements in reliability, as well as support for a wide range of new flash parts. FlashFX Pro now supports Spansion NS-P, Samsung FlexOneNAND, Micron 55nm flash parts, and all CFI-compliant NOR parts. The Datalight flash file system solution is comprised of the Reliance file system and FlashFX Pro intelligent flash media manager. Reliance was designed from the ground up for high reliability applications. Dynamic Transaction Point™ technology provides 100% immunity from file corruption, even after unexpected system interruption. Embedded applications can benefit from faster boot times that remain consistent for the life of the product, regardless of disk size.

FlashFX Pro features pre-written support for over 200 flash parts, works with virtually any NAND controller, and features wear leveling, bad block management, and garbage compaction for unrivaled performance. Datalight flash file system products are also available on other operating systems and integrated development environments.

Michele Pike | August 11, 2008 | Datalight Products, Flash Industry Info

Factors Affecting Flash Memory Performance

The read, write and erase timing characteristics of flash hardware specifications are useful for comparing different products, but don’t tell the whole story about what you will get from your real-world devices. When Flash memory is incorporated into a system, the performance of the system depends on a number of factors. One key factor that can reduce the effective performance of flash memory involves the shared bus topology of your system. Optimal flash performance depends on the speed and availability of the bus that connects the flash to the system. Also critical are the manner in which the operating system handles interrupts and whether the flash device is connected to the system’s interrupt architecture.

The published read, write, and erase timing characteristics of flash hardware specifications are useful for comparing different products, but don’t tell the whole story about what you will get from your real-world devices. When Flash memory is incorporated into a system, the performance of the system depends on a number of factors in addition to the capabilities of the flash hardware.

One key factor that can reduce the effective performance of flash memory involves the shared bus topology of your system. Optimal flash performance depends on the speed and availability of the bus that connects the flash to the system. For example, if your flash shares a bus with parts that operate at slower clock speeds, the timing of the accesses to the flash part may be extended to match. On the other hand, your flash part may be competing for bus availability with other demanding high-speed system components.

RAM memory, network interfaces, and LCD screens are demanding components that can compete with flash for bus and CPU bandwidth. The use of certain features of the processor and operating system, such as DMA and caching, can have a similar impact. As more components, peripherals, and device drivers are added to the system, more opportunities arise for the bus to be shared. The proliferation of high performance audio and video features, now common on mobile devices, can further tax a shared bus system on a general purpose chipset. For this reason special-purpose chipsets designed for a specific application, as well as tuning the characteristics of your flash management software to meet your specific needs, will generally enable higher levels of flash performance.

Well designed hardware bus topology can alleviate the issue of shared bus contention, yet other factors may still impact flash memory performance. Even if the flash part has full speed access to the processor’s external bus, the availability of the CPU to service that bus is still a question. Bus arbitration may take CPU cycles away from the flash bus in favor of other system busses or internal accesses. Operating system timer interrupts and other peripheral device driver interrupts can interfere with flash software operations, as can a CPU that is simply overloaded by running complex applications.

Also critical are the manner in which the operating system handles interrupts and whether the flash device is connected to the system’s interrupt architecture. Some flash is connected to processors in such a way that the signal generated by the flash is connected to a GPIO, or not connected at all. This may have little impact on flash performance, but it will limit the ability of the CPU to execute other flash-related software, such as garbage collection, or even unrelated tasks. Additionally, many systems have an explicit or implied interrupt priority that must be considered at the system level. Responsiveness requirements of all interrupt-driven components in the system must be carefully weighed against the desire to maximize flash performance.

An equally significant factor affecting flash performance that might be easily overlooked is the flash management software itself. There is a necessary amount of overhead inherent in running software to manage your flash memory, and there are some complex operations that the software needs to accomplish well in order to optimize flash performance. The software provided by your flash vendor may or may not provide satisfactory performance for your particular application.

While flash memory often appears to the end user like a virtual hard drive, the underlying technology is quite different and presents certain challenges. Flash management software can do more than bad block management and wear leveling, it can increase the effective performance of the flash part by addressing these challenges:

  1. Flash performance can be impeded by the need for a slow erase operation before writing new data, but software that intelligently performs background garbage collection during idle time can solve that problem.
  2. Fragmented data can degrade performance in applications such as streaming media from NAND memory, but compaction software that de-fragments the data can improve performance in these situations.
  3. With some algorithms, throughput is maximized for performance until a percentage of the flash memory is used, at which point performance can degrade. The percentage of the flash that is used before performance suffers can be tuned in some implementations, by allowing the system designer to reserve a specified amount of ‘cushion’ of unused memory.
  4. In some solutions, maintenance operations such as garbage collection can preempt high-priority read requests. Implementations that make careful use of multithreading operating systems’ capabilities to manage this issue can reduce read latency by orders of magnitude.

Several factors will affect the performance of flash memory in your real-world system, some of which may be beyond your control. Chipset hardware and system bus topology decisions may have been made already. No matter whether your hardware is specially designed for your application or you are using a general-purpose hardware design, though, the effective performance of your flash memory can be improved through software methods. Datalight FlashFX is a multithreading memory management software solution that enables garbage collection, data compaction, memory cushion, and high priority read interrupts to allow the highest real-world flash performance your hardware configuration can support.

Michele Pike | June 24, 2008 | Flash File System, Flash Memory, Performance