Re: FreeBSD parsing

From: Oskar Pearson <oskar@dont-contact.us>
Date: Thu, 16 Apr 1998 23:18:00 +0200

--MimeMultipartBoundary
Content-Type: text/plain; charset=us-ascii

Hi

> I run squid 1.1.20 at FreeBSD 4.4. According to the response time return
> from client, it is TEN TIMES SLOWER than I run it at SunOS v5. When I
> compare the result from gprof, I find that squid spent considerably amount
> of time (22.9%) in parseIntegerValue, decode_addr, aclParseIpData,
> safe_inet_addr, storeDirClean, urlParse, parseHttpRequest and sscanf at
> FreeBSD while only 3.7% of time spent in the same trace of code. Can
> anyone tell me why?

I am assuming that the sun is a sparc... right?

These aren't system call intensive...

Possibilities:

1) It's something to do with hardware

        a) faster memory access in the Solaris box.
        b) larger L2 cache in solaris (probably a few MB instead of 256kb..)
        c) Risc processors are faster at string scanning? (don't know)

2) It's something to do with the compiler

        a) Are you using gcc on both boxes?
        b) Are the optimisation settings the same?
        c) Have you tried 'egcs' on the Intel box - it's LOTS
                faster at certain functions... I think that it exists
                for FreeBSD..

3) It's something to do with squid

        Unlikely - it's the same code, right? There might be
        more efficient ways of doing it on certain architectures, but
        I think that it's normally left to the compiler (unless you
        are Linus Torvalds, or something...)

Oskar

---
"Haven't slept at all. I don't see why people insist on sleeping. You feel
so much better if you don't. And how can anyone want to lose a minute -
a single minute of being alive?"				-- Think Twice
--MimeMultipartBoundary--
Received on Tue Jul 29 2003 - 13:15:47 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:45 MST