Forum Navigation
SocketConduit + LineIterator Performance Troubles
Posted: 08/10/07 20:37:56After using oprofile a bit, trying to figure out why when sustaining 100mbit/s throughput, my SMTP daemon was using 77% cpu+, I discovered the issue:
CPU: AMD64 processors, speed 1994.89 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000
samples % image name symbol name
70617 41.7924 smtp _D5tango4text6stream12LineIterator20T12LineIteratorTaZ12LineIterator4scanMFAvZk
70617 100.000 smtp _D5tango4text6stream12LineIterator20T12LineIteratorTaZ12LineIterator4scanMFAvZk
Any ideas what can be done to increase the performance in this situation?
Basically doing:
LineIterator?!(char) it = new LineIterator?!(char)(socketConduit);
foreach(char[] line; it)
{
}
The sample messages I'm sending through are about 114MB in size, so there's several thousand lines being sent.