Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4845983

TimeZone.getDefault() is too slow, hurt overall performance, especially on SMP

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs

      We see a lot of contention on TimeZone.getDefault() when doing DB work which creates a lot of new Dates. Here the problem seems to be that we are holding a global lock while cloning the TimeZone. TimeZone should really be immutable so we don't have this problem, but I'm sure it is too late for that. Perhaps however the clone could be moved outside the synb block.

      This hurts more on big SMP boxes where their margins are higher than they do on 1P boxes where they have to compete with Intel. It is for reasons like this that we run so many VMs when running SjAS on SMP hardware.Customers see that and realize that they could probably get equivalent performance with cheaper hardware.

            okutsu Masayoshi Okutsu
            mmma Marvin Ma (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: