OpenBSD Journal

Call for testing: Concurrent malloc(3) calls (to speed up firefox)

Contributed by pitrh on from the set the fox on fire dept.

Mark Kettenis (kettenis@) posted to tech@ asking Firefox users and others to test a patch that changes the threadsafe malloc(3) strategy from spinlocks to mutexes. Mark writes,

Firefox makes a lot of concurrent malloc(3) calls. The locking to make malloc(3) thread-safe is a bit...suboptimal. This diff makes things better by using a mutex instead of spinlock. If you're running Firefox you want to try it; it makes video watchable on some machines. If you're not running Firefox you want to try it; to make sure it doesn't break things.

Testing this requires a recent -current (5.9-beta) system; grab the latest source, apply the patch, rebuild and report back any effects, good or bad.

(Comments are closed)


Comments
  1. By sthen (82.68.199.130) on

    Obviously browsers are the headline here, but it's important to get a wide spread of testing of any software that uses threads. As well as my workstation I'm also running this on machines running various services that I know to use threads (the ones I've thought of so far are mariadb, bacula, asterisk, rrdtool/rrdcached, icinga, memcached - there are plenty more of course).

    Comments
    1. By Sebastian Rother (79.247.189.118) on

      > Obviously browsers are the headline here, but it's important to get a wide spread of testing of any software that uses threads. As well as my workstation I'm also running this on machines running various services that I know to use threads (the ones I've thought of so far are mariadb, bacula, asterisk, rrdtool/rrdcached, icinga, memcached - there are plenty more of course).

      To simply ask the "about the basics"....

      Are the Developers trying to fix "ONE" Issue...or should there be some (I know it aint belofed) "Improve the Speed"-Hackatron (no compromise to security, but some stuff could get tuned).

      The reason this Change was commited was "Video-Playback on a Browser". So maybe there should be a Hackatron each 2 years which is dedicated to improve the speed but not compromising the security?


      Kind regards
      Sebastian Rother

      Comments
      1. By Anonymous Coward (82.68.199.130) on

        > To simply ask the "about the basics"....
        >
        > Are the Developers trying to fix "ONE" Issue...or should there be some (I know it aint belofed) "Improve the Speed"-Hackatron (no compromise to security, but some stuff could get tuned).

        It seems you may have missed the significance of some of the work being done on MP in pretty much every recent hackathon.

        Comments
        1. By Anonymous Coward (79.247.158.4) on

          > > To simply ask the "about the basics"....
          > >
          > > Are the Developers trying to fix "ONE" Issue...or should there be some (I know it aint belofed) "Improve the Speed"-Hackatron (no compromise to security, but some stuff could get tuned).
          >
          > It seems you may have missed the significance of some of the work being done on MP in pretty much every recent hackathon.

          I did not missed it. I think about a different approach but I don't claim I'm wrong nor right.

  2. By aalm (85.76.163.216) on

    based on what i've read by firefox users on the 'reports', wow.,
    now i'm sure i made the right choice when switching over to chromium
    years ago..

    one of the first things i do after typing password to ssh-agent,
    is that i launch chrome w/+50tabs in my "basic set of tabs",
    usually surviving (while slightly changing) over updates.

    when too busy to read everything i find interesting, i might run +week
    long periods w/+125chrome processes with no ill effects(mostly
    hw.setperf=1;),
    and doing plenty of other 'work' concurrently on the same machine.

    on a +3years old lowbudget amd64 desktop workhorse of mine:
    real mem = 34294263808 (32705MB)
    avail mem = 33250734080 (31710MB)
    bios0: ASRock 990FX Extreme9
    cpu0: AMD FX(tm)-9590 Eight-Core Processor, 4690.48 MHz
    cpu0: 4690 MHz: speeds: 4700 4500 4000 3400 2400 1400 MHz
    radeondrm0 at pci1 dev 0 function 0 "ATI Radeon HD 5670" rev 0x00

    Comments
    1. By Anonymous Coward (82.68.199.130) on

      > based on what i've read by firefox users on the 'reports', wow.,
      > now i'm sure i made the right choice when switching over to chromium
      > years ago..

      This diff also improves chromium by a lot.

      > one of the first things i do after typing password to ssh-agent,
      > is that i launch chrome w/+50tabs in my "basic set of tabs",
      > usually surviving (while slightly changing) over updates.
      >
      > when too busy to read everything i find interesting, i might run +week
      > long periods w/+125chrome processes with no ill effects(mostly
      > hw.setperf=1;),
      > and doing plenty of other 'work' concurrently on the same machine.

      I often have both chromium and firefox open with 80 or 90 tabs between them, I don't really have many problems with either.

      > on a +3years old lowbudget amd64 desktop workhorse of mine:
      > real mem = 34294263808 (32705MB)

      your "lowbudget" ram is probably more than the *combined* total of all the machines I use regularly ;)

    2. By Anonymous Coward (188.117.129.226) on

      > based on what i've read by firefox users on the 'reports', wow.,
      > now i'm sure i made the right choice when switching over to chromium
      > years ago..
      >
      > one of the first things i do after typing password to ssh-agent,
      > is that i launch chrome w/+50tabs in my "basic set of tabs",
      > usually surviving (while slightly changing) over updates.

      Interesting. You're the first heavy tab user of Chromium that I met.
      Long time ago I considered a switch, but found that the UI didn't scale.

      I get to 100 tabs nearly weekly and exceed 200 several times a year.
      My FF is configured in a way that makes each tab a 24-pixel-wide square that shows favicon and nothing more. When I exceed a screen width, I get another row of tabs. And another if needed.

      I have no problems with Firefox scalability, though I use it on FreeBSD. I consider a switch to OpenBSD and the mail exchange indeed looks bad....

      Back to Chromium. There, the fancy stylish tabs would soon get so small that there's no favicon shown. On my work PC that's 44 tabs (I get a small screen). At this point navigation between them is so slow that the browser gets barely usable. Open some more and tabs get small enough to be hard to click on precisely. At some point new tabs stop being displayed at all.

      How do you manage that? Is your screen resolution high-enogh to make it a non-problem for you? Or is there finally some plugin that can make the UI more scalable?

      Comments
      1. By rjc (rjc) on

        > > based on what i've read by firefox users on the 'reports', wow.,
        > > now i'm sure i made the right choice when switching over to chromium
        > > years ago..
        > >
        > > one of the first things i do after typing password to ssh-agent,
        > > is that i launch chrome w/+50tabs in my "basic set of tabs",
        > > usually surviving (while slightly changing) over updates.
        >
        > Interesting. You're the first heavy tab user of Chromium that I met.
        > Long time ago I considered a switch, but found that the UI didn't scale.
        >
        > I get to 100 tabs nearly weekly and exceed 200 several times a year.
        > My FF is configured in a way that makes each tab a 24-pixel-wide square that shows favicon and nothing more. When I exceed a screen width, I get another row of tabs. And another if needed.
        >
        > I have no problems with Firefox scalability, though I use it on FreeBSD. I consider a switch to OpenBSD and the mail exchange indeed looks bad....
        >
        > Back to Chromium. There, the fancy stylish tabs would soon get so small that there's no favicon shown. On my work PC that's 44 tabs (I get a small screen). At this point navigation between them is so slow that the browser gets barely usable. Open some more and tabs get small enough to be hard to click on precisely. At some point new tabs stop being displayed at all.
        >
        > How do you manage that? Is your screen resolution high-enogh to make it a non-problem for you? Or is there finally some plugin that can make the UI more scalable?

        I'm a fairly heavy tab user (20-40+ daily, occasionally many more) but stopped using mouse for navigation a long time ago - either use browser's native keyboard shortcuts or consider installing an extension, such as Vimium.

      2. By Anonymous Coward Two (65.102.191.185) on

        > When I exceed a screen width, I get another row of tabs.

        I don't. I just get an arrow to horizontally scroll through the tabs on one row. Is this an extension you're using?

        Comments
        1. By Anonymous Coward (188.117.129.226) on

          > > When I exceed a screen width, I get another row of tabs.
          >
          > I don't. I just get an arrow to horizontally scroll through the tabs on one row. Is this an extension you're using?
          >

          I use TabMixPlus to achieve this and several other things. Highly recommended.

      3. By aalm (85.76.22.158) on

        > Back to Chromium. There, the fancy stylish tabs would soon get so small that there's no favicon shown. On my work PC that's 44 tabs (I get a small screen). At this point navigation between them is so slow that the browser gets barely usable. Open some more and tabs get small enough to be hard to click on precisely. At some point new tabs stop being displayed at all.
        >
        > How do you manage that? Is your screen resolution high-enogh to make it a non-problem for you? Or is there finally some plugin that can make the UI more scalable?

        cwm(1) does it for me, and it does it well; i just group the tabs (by interest)
        into 3-6 different windows belonging to separate groups in cwm.
        i get favicon+first letter with around 35 tabs even with screen in portrait(1440x2560).

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]