Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-1665

performBackendInitializationProcessing takes a very long time when backup.info contains lots of entries

    Details

    • Support Ticket IDs:

      Description

      With a backup.info file containing 6500 entries an OpenDJ instance on a reasonably fast local VM takes over an hour to startup, constantly at 100% CPU usage on one core.

      It looks like this time is mostly spent within BackupDirectory.readBackupDirectoryDescriptor().

      This seems to be a very long time for the size. There also does not seem to be a good inbuilt way for people to manage backup.info, and hence it would not be unexpected to reach an entry count of this magnitude.

      Example stacktrace:

      "main" prio=10 tid=0x00007f1994008800 nid=0x520b runnable [0x00007f199a072000]
         java.lang.Thread.State: RUNNABLE
      	at sun.util.calendar.ZoneInfo.getTransitionIndex(ZoneInfo.java:351)
      	at sun.util.calendar.ZoneInfo.getOffsets(ZoneInfo.java:271)
      	at sun.util.calendar.ZoneInfo.getOffsets(ZoneInfo.java:248)
      	at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2276)
      	at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2248)
      	at java.util.Calendar.setTimeInMillis(Calendar.java:1140)
      	at java.util.GregorianCalendar.<init>(GregorianCalendar.java:621)
      	at java.util.Calendar.createCalendar(Calendar.java:1030)
      	at java.util.Calendar.getInstance(Calendar.java:1013)
      	at java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:682)
      	at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:581)
      	at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:560)
      	at org.opends.server.types.BackupInfo.decode(BackupInfo.java:554)
      	at org.opends.server.types.BackupDirectory.readBackupDirectoryDescriptor(BackupDirectory.java:564)
      	at org.opends.server.backends.BackupBackend.getBackupEntry(BackupBackend.java:637)
      	at org.opends.server.backends.BackupBackend.search(BackupBackend.java:908)
      	at org.opends.server.core.SubentryManager.performBackendInitializationProcessing(SubentryManager.java:372)
      	at org.opends.server.core.BackendConfigManager.initializeBackendConfig(BackendConfigManager.java:326)
      	at org.opends.server.core.DirectoryServer.initializeBackends(DirectoryServer.java:2211)
      	at org.opends.server.core.DirectoryServer.startServer(DirectoryServer.java:1398)
      	- locked <0x00000000e757e7b8> (a org.opends.server.core.DirectoryServer)
      	at org.opends.server.core.DirectoryServer.main(DirectoryServer.java:9651)
      

      Number of entries:

      [root@opendj2 bin]# grep -c backup_id= ../bak/backup.info 
      6517
      

      CPU time 65minutes:

      21000 root      20   0 1340m 254m  12m S  0.7 13.6  65:20.96 java
      

      CPU:

      model name	: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthew Matthew Swift
                Reporter:
                ian.packer Ian Packer [X] (Inactive)
                QA Assignee:
                Ondrej Fuchsik
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: