AoEde / Blog: Recent posts

Changes

  • Multiple interfaces support. However by default only single interface supported - see README for details how to use multiple NICs.
  • Idle timeout now works (periodic buffers flushed, memory released when not used for a long time) when compiled without mapped ring buffer support.
Posted by Killer{R} 2014-07-27

Today's changes

  • Avoid memcpy when possible during buffered read (send directly from buffer memory)
  • SOCK_RXRING option is off by default. It appeared that stupid but aligned buffer often faster. (To be investigated)
  • All IO buffers now aligned to page boundary instead of 512 bytes. It also sometimes faster
  • Fixed long delay on exit when compiled without SOCK_RXRING
  • More flexible selecting blocks/frames count for mapped buffer if SOCK_RXRING enabled
  • Added optional CRC8x4 data verification support. Normally its not necessary cause ethernet hardware already uses CRC32 for packets data integrity verification and this option defeats performance. However it can be useful to diagnose hardware problems or if user is paranoiac enough. To enable its support by this target uncomment '#define SUPPORT_CRC' in tuneup.h before making project. Note that initiator should be able to deal with this option and should request it explicitly as extension otherwise it will have no effect.
Posted by Killer{R} 2014-07-06

Freezing shadows helping data backup

Introducing initial commit of new feature: blade image freeze with shadowing support. What it means? Its now possible to stop any modifications to disk image file or device, while keeping client to work as usual (may be only a bit slower than usual). How it works? When received 'freeze' signal AoEde flushes all its internal buffers and begin functioning in special freezed mode until gets 'unfreeze' signal. Also you can specify temporary shadow file, where all writes will go instead while actual image remains 'freeze'-d. Use option -f for that, like:
aoede -b 64 1 1 egiga0 /var/.AOE/disk11.fs -f /var/.AOE/shadow11.fs
Also make sure that shadow file located on filesystem that supports sparse files, otherwise it will instantly occupy a bit more space than size of main image.
How to freeze/unfreeze? Very simple. Use kill for that:
freeze:
kill -USR1 ${AOEDE_PID}
kill -USR2 ${AOEDE_PID}
unfreeze:
kill -USR1 ${AOEDE_PID}
kill -USR1 ${AOEDE_PID}
kill -USR2 ${AOEDE_PID}
Note that freezing/and unfreezing doesn't performed instantly. So after sending freeze sequence wait until AoEde will create shadow file. And after sending unfreeze - wait until that file will be removed. KISS as it is.
Unfreezing flushes written data to main image 'in background', without stopping serving initiator requests. However this process noticeable decreases performance until finishes. Nothing comes free in this world :(

Posted by Killer{R} 2014-06-22 Labels: freeze unfreeze shadow

O_DIRECT vs FS/device block size

Direct IO works faster if operations regions boundaries are aligned to image file's filesystem or shared device block size. In case of unaligned access each write operation needs to read data from blocks at unaligned begin and end of requested region, then merge it with data came in request and then write combined buffer to file/device. Read request is also not good - actually system reads more data from device than requested, and puts only part of it to requester's buffer that obviously is not very efficient. Today's ext* FS use commonly block size of 4KB, and same block size goes into favor of large HDD manufacturers. However currently AoE supports blindly 512 bytes block that makes it work slower or consume more resources of target hardware that it could when working in O_DIRECT.
Today I commited changes to AoEde to overcome this as possible: AoEde when possible recombines sequential read/write operations so final disk reads/writes will go by offsets/sizes aligned to block size.

Posted by Killer{R} 2014-06-22 Labels: block size 4k sector