Sunday, December 4, 2011

Embedded Linux Interprocess Communication Mechanisms Benchmark

Hi there,

this is my first attempt to blog, so please excuse me for not having or following any stylistic conventions for this kind of writing. As a matter of fact writing is not something I do often. That being said, I'm open to any criticism regarding either misuses of the English language or errors/omissions in the information content I will eventually present. So fell free to post comments and such.

This first post is intended to be the initial part of a benchmark test on some IPC (Interprocess Communication) mechanisms that I'm evaluating to implement in a commercial product. I will not going to disclose what the project or product is about, but I will outline the requirements of the subsystem involved in the test.

Overview

Before we start dealing with the problem, I would like to make some comments regarding the usefulness of the results I intend to achieve. For most of the reviews or comparisons out there there is a lack of information regarding the platform on which the tests where performed. In my opinion, this makes things a little confusing when you try to figure out whether such a solution will be appropriate or not for your system. Because differences in cache sizes and architectures, memory bandwidth, library implementation and other factors may affect the results, favoring one or another solution will depend on taking this conditions into account. This way whatever the results may be in my particular tests, I will only recommend the use of a particular approach to someone who have a similar platform.

The system I'm working right now is based on an ARM9926EJ processor with 8KiB of data cache and 16KiB of instruction cache. The processor clock is close to 300MHz and the system memory is a 128MiB 16bits DDR2 type running roughly at 540MHz.
The Linux kernel version is 2.6.32 and the C library is glibc version 2.8.

The testing setup will consists of two process: a server and a client that will perform 3 type of conversation:

1 - Synchronous request - the client issue a request to the server, which will perform some tasks and return some data as result. The size of the reply may vary between 4 to 1024 bytes, depending on the service being requested. The client will wait (block) for the server to reply.
2 - Synchronous send - the client send some data to the server (4 to 1024 bytes) and waits for the server to process it and reply back with a status.
3 - Asynchronous notification - the client send a notification (event) to the server without waiting for acknowledgment.


The mechanisms being tested are:

1 - POSIX Message Queues (mq): in this case the messages will be send, received and synchronized trough the mechanism itself. It's a very straightforward implementation.
2 - POSIX Shared Memory + POSIX Semaphores: this will be a little more evolving as we need to have a mechanism to send the data (Shared Memory) and another for synchronization and mutual exclusion ( in case we have more than one client accessing the server's shared memory resources).
3 - ONC RPC (Open Network Computing Remote Procedure Call - aka SUN RPC) :  it may seems a little odd why I want even to consider this but some of the reasons are:

  • It will simplify the interface creation trough the use of the XDR (kind of IDL)
  • It will enable the same API to be used for remote access which is another requirement of the product.
  • It has provision for UNIX Sockets for local transactions (although I, myself, never used it) 
  • It will be fun to do it.

2 comments:

  1. Slot Site Review - Chukchun, China | Casino Site
    The SlotsSite.com site 카지노사이트 is rated by bet365 our members and has 1 review. 우리카지노 계열사 It's 100% legit and the game is very fair.

    ReplyDelete
  2. Slotyro Casino: 2021 Gambling Information - Mapyro
    View the online version of Slotyro Casino - 2021 Gambling Information from Mapyro. 문경 출장샵 Find online 삼척 출장안마 Casinos with 제주 출장샵 Slotyro Casino titanium tubing and play with real 경상남도 출장샵 money

    ReplyDelete