LWN.net Logo

64-bit performance

64-bit performance

Posted Apr 15, 2008 7:32 UTC (Tue) by laf0rge (subscriber, #6469)
In reply to: 64-bit performance by epa
Parent article: My kid hates Linux (ZDNet)

The entire linux networking stack, and especially netfilter/iptables with connection tracking
is running 10-15% slower on x86_64 than on i386 kernels.

The main reason being that all pointers are suddenly twice as large, and thus most data
structures need at least one more cache line, resulting in significantly less of the working
set being present in cache, increasing cache misses, etc.

I think any code that has a lot of pointers in data structures should see the same effect.


(Log in to post comments)

64-bit performance

Posted Apr 15, 2008 19:39 UTC (Tue) by bronson (subscriber, #4806) [Link]

That's very interesting.  Has anybody tried working around this?

One solution would be convert hot 64-bit ptr fields to 32-bit offsets pointing into a single
memory pool.  I'm not familiar enough with the networking code to know how traumatic this
would be.  (I'm definitely not saying do this everywhere; just where it really matters).

This topic might make a fairly fascinating paper.  :)

64-bit performance

Posted Apr 18, 2008 6:07 UTC (Fri) by alankila (subscriber, #47141) [Link]

We should have pointers of a size intermediate between 32 and 64 bits, let's say 40-bit
pointers. The point being that the it'd be large enough to address the RAM necessary but
doesn't waste so much space.

I really don't think we'll ever grow to the point where we'll use all of the 64-bit pointer
address space, and pointers with top 20-30 bits unused are just wasted space.

Too bad that the whole world thinks in 2^n.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds