Fighting with DEV ENV

About a month ago I thought about upgrading my current T420s laptop to something more modern and powerful, unfortunately it have turned out that laptop market is unable to offer anything suitable for me, though I do not expect anything extraordinary, just:

So, I gave up the idea to buy new laptop and decided to save moneyspend money on booze, but such approach does not actually solve my problem: I need to run a couple of virtual machines with Documentum on my current laptop. What to do? The answer is obvious: take a problem and solve it. Below you can find some suggestions about how to decrease memory footprint for Documentum and increase response time – finally, I got something like:

Decrease number of concurrent jobs

By default agentexec executes up to three jobs in a polling cycle, some of docbase jobs are too heavy for being run simultaneously.

API> retrieve,c,dm_method where object_name='agent_exec_method'
...
10024be980000171
API> get,c,l,method_verb
...
./dm_agent_exec -max_concurrent_jobs 1
API>

Disable saving job’s logs into repository

Actually, this suggestion is very controversial and it may not work in some cases. The problem is vendor assumes that putting “ECM” label on software product automatically turns this product into scrap-heap, agentexec is a good confirmation of this point: every time when agentexec executes job it saves job’s log into repository, and, as per my memory, I had checked those logs may be four or five times during last eight years, why do not disable this useless feature? I believe that it’s fucking simple to add extra attribute to dm_job object to control behavior of agentexec, instead of that vendor created dumb job intended for clearing obsolete logs. Fortunately, when playing with dm_job’s method_trace_level attribute I have found that setting method_trace_level to -1 prevents agentexec from saving job’s log into repository, unfortunately, standard jobs does not recognize this value:

[com.documentum.mthdservlet.DoMethod] - Exception invoking com.documentum.bpm.method.XCPAutoTasKMgmt.
DfMethodArgumentException:: THREAD: http--0.0.0.0-9080-1; 
       MSG: [DFC_METHOD_BAD_ARGUMENT_VALUE] Argument method_trace_level 
       has an invalid value (4294967295); ERRORCODE: ff; NEXT: null
    at com.documentum.fc.methodserver.DfMethodArgumentException.invalidArgument(DfMethodArgumentException.java:29)
    at com.documentum.fc.methodserver.DfMethodArgumentManager.getInt(DfMethodArgumentManager.java:122)
    at com.documentum.fc.methodserver.DfStandardJobArguments.<init>(DfStandardJobArguments.java:60)
    at com.documentum.fc.methodserver.DfMethodArgumentManager.getJobArguments(DfMethodArgumentManager.java:248)
    at com.documentum.fc.methodserver.DfMethodArgumentManager.<init>(DfMethodArgumentManager.java:97)
    at com.documentum.bpm.Utils.GenericJobMethod.execute(GenericJobMethod.java:41)
    at com.documentum.mthdservlet.DfMethodRunner.runIt(Unknown Source)
    at com.documentum.mthdservlet.AMethodRunner.runAndReturnStatus(Unknown Source)
    at com.documentum.mthdservlet.DoMethod.invokeMethod(Unknown Source)
    at com.documentum.mthdservlet.DoMethod.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

What to do? HexEditor to the rescue: I have replaced “-docbase_name %s -user_name %s -job_id %s -method_trace_level %s” pattern in dm_agent_exec binary by “-docbase_name %s -user_name %s -job_id %s -method_trace_level 0” and now agentexec does not save job’s logs into repository and jobs are happy with parsing 0 as trace level:

API> ?,c,select count(*) from dm_document where FOLDER('/Temp/Jobs',DESCEND)
count(*)
----------------------
                     0
(1 row affected)

Another problem with agentexec it loves to store log files with stupid names in $DOCUMENTUM/dba/log/<docbaseid>/agentexec directory:

agentexec]$ ls | grep save.
agentexec.log.save.07.17.15.18.31.17
job_08024be9800018bc.save.07.17.15.18.46.22
job_08024be9800050cf.save.07.17.15.18.32.49
job_08024be9800050cf.save.07.17.15.18.37.20
job_08024be9800050cf.save.07.17.15.18.44.50
job_08024be980005ce1.save.07.17.15.18.34.19
job_08024be980005ce1.save.07.17.15.18.38.50
job_08024be980006763.save.07.17.15.18.31.20
job_08024be980006763.save.07.17.15.18.40.20
job_08024be980006766.save.07.17.15.18.35.49
job_08024be980006766.save.07.17.15.18.41.50
job_08024be9800067c1.save.07.17.15.18.43.20

to solve this problem I replaced “%s.%s.%02d.%02d.%02d.%02d.%02d.%02d” pattern in dm_agent_exec binary by “%s.%s\0%02d.%02d.%02d.%02d.%02d.%02d” (\0 is a binary zero).

Disable useless jobs

By default, Documentum installer enables following jobs:

  • dm_usageReport
  • dm_WfmsTimer
  • dm_ContentWarning
  • dm_DBWarning
  • dm_StateOfDocbase
  • dm_UpdateStats
  • dm_DataDictionaryPublisher
  • dm_bpm_XCPAutoTaskMgmt
  • dce_Clean
  • dm_QmPriorityAging
  • dm_QmPriorityNotification
  • dm_QmThresholdNotification
  • dm_WFReporting
  • dm_WFSuspendTimer

and all of them are useless for development environment:

API> ?,c,update dm_job objects set is_inactive=TRUE 
   where object_name like 'dm\_%' escape '\' or object_name like 'dce\_%' escape '\'
objects_updated
---------------
             50
(1 row affected)
[DM_QUERY_I_NUM_UPDATE]info:  "50 objects were affected by your UPDATE statement."

Improve startup time of DMCL applications

java.ini:

#
# java_options      - Options for the Java VM.
#
java_options = "-Xms4m -Xmx64m -XX:PermSize=4m -XX:MaxPermSize=256m -XX:+UseSerialGC -Xrs"

java.security:

#
# List of providers and their preference orders (see above):
#
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=sun.security.ec.SunEC
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
security.provider.7=com.sun.security.sasl.Provider
security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.9=sun.security.smartcardio.SunPCSC

Improve startup time of Java Method Server

  1. undeploy acs.ear
  2. tune heap size – default settings: -Xms1024m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m are too greedy
  3. replace standalone.xml with:
    <?xml version='1.0' encoding='UTF-8'?>
    
    <server xmlns="urn:jboss:domain:1.2">
    
        <extensions>
            <extension module="org.jboss.as.deployment-scanner"/>
            <extension module="org.jboss.as.ee"/>
            <extension module="org.jboss.as.naming"/>
            <extension module="org.jboss.as.remoting"/>
            <extension module="org.jboss.as.security"/>
            <extension module="org.jboss.as.web"/>
        </extensions>
    
        <profile>
            <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
                <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="0" deployment-timeout="300"/>
            </subsystem>
            <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
            <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
            <subsystem xmlns="urn:jboss:domain:remoting:1.1"/>
            <subsystem xmlns="urn:jboss:domain:security:1.1">
                <security-domains>
                    <security-domain name="other" cache-type="default"/>
                </security-domains>
            </subsystem>
            <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
                <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
                <virtual-server name="default-host" enable-welcome-root="true">
                    <alias name="localhost"/>
                    <alias name="example.com"/>
                </virtual-server>
            </subsystem>
        </profile>
    
        <interfaces>
            <interface name="public">
                <inet-address value="${jboss.bind.address:0.0.0.0}"/>
            </interface>
        </interfaces>
    
        <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
            <socket-binding name="ajp" port="9089"/>
            <socket-binding name="http" port="9080"/>
            <socket-binding name="https" port="9082"/>
        </socket-binding-group>
    
    </server>
    

Disable SSL

It seems that starting from 7.2(?) Documentum installer enables SSL by default:

API> retrieve,c,dm_server_config
...
3d024be980000102
API> get,c,l,secure_connect_mode
...
secure

disable it to improve response time:

API> set,c,l,secure_connect_mode
SET> native
...
OK
API> save,c,l
...
OK

Disable email notifications

server.ini:

mail_notification = F

Disable updating last_login_utc_time attribute of dm_user objects

API> ?,c,exec exec_sql with 
    query='update dm_user_s set i_vstamp=i_vstamp+1, 
    last_login_utc_time=to_date(''01.01.0001'',''dd.mm.yyyy'')'
result
------------
T
(1 row affected)

Disable updating r_access_date attribute of dm_sysobject objects

server.ini:

update_access_date = F

Disable MACL security

API> retrieve,c,dm_docbase_config
...
3c024be980000103
API> set,c,l,macl_security_disabled
SET> T
...
OK
API> save,c,l
...
OK

Disable dmbasic method server

server.ini:

# This controls the dmbasic method server.
method_server_enabled = F
method_server_threads = 5

Disable auditing

API> unaudit,c,,dm_default_set
...
OK
API> unaudit,c,,dm_logon_failure
...
OK

5 thoughts on “Fighting with DEV ENV

  1. I apologize if my reply sound bit arrogant, however…
    I am not sure how Mac could cost in Russia, but I was able to ran 2 Fusion VM (parallels will work too) on my Mac book pro with 16 GB memory and 512 GB solid state drive. I put app server (tomcat) on the OsX and docbases on VMs. And it runs like pretty well. I mean faster than my colleagues windows machine. Besides I am not wary about viruses too much. All extra stuff like photos, books, etc I keep on external network drive. This mac was made late 2013 or early 2014. No retina display (in order to cut the cost). Otherwise it pretty much as is. If you put 2 nice monitors in set-up you might have 3 screens system.

    Like

  2. EON15-S Pro

    you are probably kidding, 15.6″, 6.8 pounds w/o charger – I will need a trolley instead of of bag 🙂

    I am not sure how Mac could cost in Russia

    Neither do I, moreover I can’t understand how shabby mirror could cost 3500 AUD.

    Like

  3. Pingback: Fighting with Composer. Mac OS X | Documentum in a (nuts)HELL
  4. Pingback: Weird release management | Documentum in a (nuts)HELL

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s