Find the answer to your Linux question:
Results 1 to 9 of 9
I have a simple question . Today I installed privoxy, to get some decent ad-blocking in Opera (my filter.ini file and stuff was giving mixed results - ugly layout and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429

    Performance difference between striped and non-striped ELFs


    I have a simple question . Today I installed privoxy, to get some decent ad-blocking in Opera (my filter.ini file and stuff was giving mixed results - ugly layout and stuff...). Visual improvement all the way, no problemo. However, I did not succeed in compiling it myself (make install exited with error[1] and it wasn't clear to me what the cause was), so I installed a premade .tgz package (the only one I could find on slackware packages sites).

    I installed privoxy, configured my browser, so far so good, it worked. But loading sites took ages! Now I use a Perl script to check packages (my own and other's) if they are created well (stripped ELFs, right directories, permissions, ...), and all seemed fine with this one. However, I ran the 'file' command on /usr/sbin/privoxy, and it said to me 'ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped'.

    Ok. So I remove the installed package, extract the tgz, and strip the executable, and I make a new .tgz. Now everything goes a lot faster - I nearly don't notice the difference between surfing without or with privoxy!?

    Now my question is: Can striping really make such a difference?!
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    Noone with similar experiences? ...
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  3. #3
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    The Hot Humid South
    Posts
    602
    As far as I know, stripping an executable just removes all the comments (lines starting with #) out of the file. I guess it could make it slightly faster, but not enough for you to notice. When I did the Pocket Linux Guide, I had to stripe every program so that it would not take up as much space, so I can see it speeding up things since there's not as much stuff that needs to go into memory when you load it.

  4. #4
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,132
    I was under the impression that comments were ignored completely by compilers - is this not the case?

  5. #5
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    Quote Originally Posted by bigtomrodney
    I was under the impression that comments were ignored completely by compilers - is this not the case?
    What do you mean? There's debugging information and lots of other stuff present after compiling.
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  6. #6
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    The manpage for strip (that was a difficult at-work Google, let me tell you) gives a little more information:

    http://web.cse.msu.edu/cgi-bin/man2h...rip?1?/usr/man

    My professors in college said that stripping did in fact help with performance. I haven't done enough C++ development professionally to say.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  7. #7
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    Right now, Opera with privoxy seems to be as quick as without before, so... And surely a lot quicker then with an unstripped privoxy binary. Of course I haven't timed it, it could just have been me proud about being able to strip a stupid binary .
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  8. #8
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    The Hot Humid South
    Posts
    602
    Just goes to show my memory sucks. I did remember it took unneeded info though.

    You can do the same to libraries, but you will need the "--strip-unneeded" parameter or else it'll just remove way too much stuff, some of which you will want.

  9. #9
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    Are there switches you need for executables? I just did
    Code:
    # strip privoxy
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •