Translation Lookaside Buffer Flush Optimization

The Translation Lookaside Buffer is a small associative memory that caches virtual to physical page table addresses. When page tables have been updated, such as after a page fault, the processor may need to update the TLB for that virtual address mapping. May, because some processor architectures implement this in hardware logic some other architectures need support by the operating system. Flushing TLB is a really expensive operation - depending on the architecture (e....

August 6, 2010 · 3 min · Hagen Paul Pfeifer

Netsend Artificial Read Delay

Today I invest my time in adding a new option for “netsend”:http://netsend.berlios.de to introduce an artificial @read()@ delay in the receiver path. The new option can be enabled via: netsend -v loudish -B 10,1 -b 250 -s SO\_RCVBUF 1 tcp receive The options states that the receiver should initial block for 10 seconds and then read 250 byte chunks with a delay of one second: @-B 10,1@. If you waive the initial delay you can also skip the coma separated list and hand over only one argument, e....

August 5, 2010 · 1 min · Hagen Paul Pfeifer

IPv6 Flow Label Usage Scenarios

The 20 bit wide Flow Label field in the IPv6 header is a integral part of the protocol specification, standardized in “RFC 2460”:http://tools.ietf.org/html/rfc2460 The field may be used to mark sequences of packets for which the sender request special handling at intermediate routers. The standard explicitly does not define the what, it exemplary provides two examples (real-time and non-default quality of service routing) and that’s all. At the specification time nobody was in the ability to specify how this field may be used in the future or may not used for....

August 1, 2010 · 2 min · Hagen Paul Pfeifer

Mencoder Video Editing

Today it was a lazy evening: no productive hacking, no deeper technical discussions, no email answer sessions, no peer reviews, nothing – just passive reading and … command-line video editing – vacation for the brain. Sometimes I am to cushy to use my camcorder or my “EOS 7D”:http://www.dpreview.com/previews/canoneos7d/ to make a film. Instead I use my handy “Canon IXUS”:http://www.canon.co.uk/for_home/product_finder/cameras/digital_camera/ixus/digital_ixus_100_is/index.asp and shoot some pictures, one after another. Later on at home I use “mencoder”:http://www....

July 29, 2010 · 2 min · Hagen Paul Pfeifer

Frame Intertransmission Delay for Different Frame Sizes

For some analysis I plotted the inter-frame delay in microseconds within the transmitter must send a frame to archive the desired transmission rate. For a 10Gbit network adapter and a 10 byte frame the time between subsequent transmission must be 0.008 microseconds (or 8 nanoseconds or 8e^-09^ seconds) The illustration with a logarithmic y scale: Not really thrilling or exciting, I generated the images to illustrate the difficulties to generate a bandwidth exact bytestream where the operating system as well as hardware components are working at the edge....

July 27, 2010 · 1 min · Hagen Paul Pfeifer

Interactive TCP Traffic and Delayed ACKs

Interactive TCP traffic - like telnet - is often single byte character interactions: a pressed key, encoded via a char data type, is transmitted to the server, processed at the server side and echoed back to the client. These days telnet can be considered as antiquated because of security shortcomings and the Secure SHell step into telnets shoes. The one byte transmission is expanded to a ~32 byte chunk because of cryptography overhead....

July 21, 2010 · 4 min · Hagen Paul Pfeifer

UDP TX and RX Delays

The following image illustrates the accumulated delays during the transmission of UDP packets. Starting with a 1 second sleep with theoretical no delay, but practical delay of ~200 microseconds on a un-busy box till due to timer granularity and concurrent processes (not in this scenario), till transmission delays via intermediate routers, NIC interrupt moderation and finally RX side scheduler latency. !http://blog.jauu.net/2010/07/20/UDP-TX-and-RX-Delays/udp-rx-tx-delay-thumb.png!

July 20, 2010 · 1 min · Hagen Paul Pfeifer

Increasing TCPs Initial Congestion Window

Noting really special today, … except that it is time for another debate about the increase of the initial CWND from currently max. 4 to N. Where N differs from month to month and vendor to vendor. Currently standard TCP is not seasoned to meet the new network environments. There are still networks with a BDP from 1980 - MANET, Sensor Networks and so on are typical examples. Google press ahead the thematic mainly because a increased initial CWND instantly enhance the user experience for a typical web session....

July 15, 2010 · 1 min · Hagen Paul Pfeifer

UDP TX Buffer Behaviour and Egress Queueing

UDP sockets - if corking is disabled - always push packets directly to the lower layers. In the case of IPv4, @ip_output()@ will forward the packet to Netfilter where the firewall rules are applied. @ip_finish_output()@ calls @ip_finish_output2()@ which on his part calls neigh_hh_output() which put the cached layer 2 Ethernet header in front of skb and finally call @dev_queue_xmit()@. @dev_queue_xmit()@ queues the packet in the local egress queue - default is a FIFO queue (@pfifo_fast@) but sophisticated queuing strategies are available and often selected....

July 13, 2010 · 3 min · Hagen Paul Pfeifer

CRC 16 CCITT Performance

The CRC-16-CCITT is a cyclic redundancy check - one among many - defined and derived from polynomial x^16^ + x^12^ + x^5^ + 1. It is used by X.25, HDLC, XMODEM, bluetooth, phy header verification and many others. During some analysis I stumbled across the following implementation: unsigned char ser\_data; static unsigned int crc; crc = (unsigned char)(crc >> 8) | (crc << 8); crc ^= ser\_data; crc ^= (unsigned char)(crc & 0xff) >> 4; crc ^= (crc << 8) << 4; crc ^= ((crc & 0xff) << 4) << 1; The expression @(crc « 8) « 4@ quizzicaled me a little bit because @crc«12@ seems more efficient and is mainly equivalent....

July 12, 2010 · 2 min · Hagen Paul Pfeifer