performance

A performance, in performing arts, generally comprises an event in which a performer or group of performers behave in a particular way for another group of people, the audience. read more at WikiPedia

  • Â

    Work in progress

  • eclipse_home_header

    Eclipse is an open source community whose projects are focused on building an open development platform
    comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across
    the lifecycle.

    I am using these settings for more than a year now, and the speed gain you can expect is in the range
    of 40%. Eclipse is more responsive, start up time is nearly divided by 2! These gains are reproducible
    on different machines in the office.

    Conditions

    • You must have a dual processor or quad core, (better if you use VMarg1)
    • You must start Eclipse with Java 1.6, note that you can still compile your project with Java 1.5
      (see windows - preferences - java - Installed JRE's)

    The tricks is to use the optimization done in JDK 1.6 (VMarg2) and the new agresivityof the Just In Time
    compiler (JIT) for VMarg3

    Add theses VM arguments to eclipse.ini (file is located in your Eclipse directory)
    eclipse.ini

    -XX:-UseParallelGC -XX:+AggressiveOpts -XX:-UseConcMarkSweepGC

    Some details about what these parameters are doing:

    VMarg1 -XX:-UseParallelGC

    Use parallel garbage collection for scavenges. (Introduced in 1.4.1) this will create more threads running in parallel, so the second processor will be put in use

    VMarg2 -XX:-UseConcMarkSweepGC

    Use concurrent mark-sweep collection for the old generation. (Introduced in 1.4.1)

    The Eclipse GUI will feel more responsive as memory will be reclaimed without blocking VM executions.

    VMarg3 -XX:+AggressiveOpts Turn on point performance compiler optimizations that are expected to be default in upcoming releases. (Introduced in 5.0 update 6.)

    &160;

    More about tuning Garbage collector HERE and at the Java HotSpot VM Options page

  • Resources such as JavaScript and CSS files can be compressed before being sent to the browser, improving network efficiencies and application load time in certain case. If you are not using Apache with mod_deflate or nginx in front of your web application, you may need to implement resources compression yourself….

    Wait! don’t start writing your own filter to compress files like CSS, html, txt, javascript it is way more difficult than you think to properly handle http response headers and do proper handling of mime type and caching. In one sentence don’t start reinventing the wheel: use ehcache for example.

    Ehcache is an open source, standards-based cache used to boost performance, offload the database and simplify scalability. Ehcache is robust, proven and full-featured and this has made it the most widely-used Java-based cache. It can scale from in-process with one or more nodes through to a mixed in-process/out-of-process configuration with terabyte-sized caches. For applications needing a coherent distributed cache, Ehcache uses the open source Terracotta Sever Array.

    in the pom.xml of your project add the following dependency to ehcache-web

    <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-web</artifactId>
        <version>2.0.4</version>
    </dependency>

    in your web.xml, add a filter and configure it properly

    <filter>
     <filter-name>CompressionFilter</filter-name>
     <filter-class>net.sf.ehcache.constructs.web.filter.GzipFilter</filter-class>
    </filter>
    <filter-mapping>
     <filter-name>CompressionFilter</filter-name>
     <url-pattern>*.css</url-pattern>
    </filter-mapping>
    <filter-mapping>
     <filter-name>CompressionFilter</filter-name>
     <url-pattern>*.html</url-pattern>
    </filter-mapping>
    <filter-mapping>
     <filter-name>CompressionFilter</filter-name>
     <url-pattern>*.js</url-pattern>
    </filter-mapping>
    <filter-mapping>
     <filter-name>CompressionFilter</filter-name>
     <url-pattern>/*</url-pattern>
    </filter-mapping>

    Read more at EhCache Web Caching page.

    As a bonus, I provide you also below the configuration for the famous challenger HTTP server nginx

     ##
     # Gzip Settings
     ##
     gzip  on;
     gzip_http_version 1.1;
     gzip_vary on;
     gzip_comp_level 6;
     gzip_proxied any;
     gzip_types text/plain text/css application/json application/x-javascript \
    text/xml application/xml application/xml+rss text/javascript \
    application/javascript text/x-js; gzip_buffers 16 8k; gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    &160;

    or for the number one HTTP server Apache using mod deflate /etc/apache2/conf.d/deflate.conf

    <Location />
    # Insert filter
    SetOutputFilter DEFLATE
    
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/atom_xml
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE text/html
    
    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    
    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    
    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    
    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
    </Location>
  • SEO

    This is an instant, free and no-registration tool to analyze the SEO performance of a URI for a given key phrase. Reports include a variety of useful information and structured recommendations to improve overall effectiveness. Try a few reports and judge for yourself. The tool aims to encourage the use of standards compliant, user-friendly and accessible code while at the same time helping website-owners to attract more visitors to their websites. Of course, no automated tool can substitute for a human analysis by an experienced search engine optimizer.

    The Reaction Engine_ a Free Online SEO Analysis Tool&160;

    Validation

    This validator checks the markup validity of Web documents in HTML, XHTML, SMIL, MathML, etc.

    The W3C Markup Validation Service

    A lot of other validation tools are available: RSS/Atom feeds or CSS stylesheets, MobileOK content, or to find broken links

    Usability

    Website Optimizer, Google’s free website testing and optimization tool, allows you to increase the value of your existing websites and traffic without spending a cent. Using Website Optimizer to test and optimize site content and design, you can quickly and easily increase revenue and ROI whether you’re new to marketing or an expert.

    Website Optimizer_google_com

    userfly.com provides instantaneous web user studies by recording user visits and letting you play them back to see every mouse movement, click, and form interaction. Conducting a user study doesn’t have to be expensive or a logistic nightmare. With userfly.com you can perform simple and cheap user testing with your real users. Not free, but as low as 10$ to start a usability campaign.

    Web usability testing made easy_userfly_com&160;

    Accessibility

    WAVE is a free web accessibility evaluation tool provided by WebAIM. It is used to aid humans in the web accessibility evaluation process. Rather than providing a complex technical report.

    WAVE - Web Accessibility Evaluation Tool&160;

    This is how a report look like, WAVE shows the original web page with embedded icons and indicators that reveal the accessibility of that page.

    WAVE report of Welcome to the Cédric Walter Home&160;

    Performance

    A free web site speed test to improve website performance. Enter a URL to calculate page size, composition, and download time. The script calculates the size of individual elements and sums up each type of web page component. Based on these page characteristics the script then offers advice on how to improve page load time. The script incorporates the latest best practices from Website Optimization Secrets, web page size guidelines and trends, and web site optimization techniques into its recommendations.

    Web Page Analyzer - free website optimization tool website speed test check website performance report from web site optimization' - www_websiteoptimization_com

  • 01 February 2006

    My site has been put offline because of the workload it put on my provider infrastructure...

    It seems that the {SEO/SEF} engine (www.open-sef.org) combined with the number of visitors (1300 daily), hits (1.8M monthly), bandwidth (11 to 16Gb monthly) stress the mySQL server too much. My site also run on a machine where there is already 90 others clients. My recent popularity is related to the open source development I am doing for Joomla (7 GPL projects hosted at {www.joomla.org}):

    * com_akobookPlusModified version of the great akobook from arthur konze, This version now protect JOOMLA Guestbook entry from spammers using: - com_security (captcha), - com_hashcash (crypto hashkey), - com_bayesianNaiveFilter (learning filters) all these methods can be defeat through...using advanced techniques

    * com_akocommentPlusModified version of the great akocomment from arthur konze, This version now protect JOOMLA comments from spammers using: - com_security (captcha), - com_hashcash (crypto hashkey), - com_bayesianNaiveFilter (learning filters) all these methods can be defeat through...using advanced techniques

    * com_bayesianSpamFilteringA spam filter that evaluates email message content to determine the probability that it is spam. Bayesian filters are adaptable and can learn to identify new patterns of spam by analyzing incoming email.. Instead of identifying subject line or headers of the email, Bayesian filter will review the content of the email to prevent or block spamming. Bayesian filtering is the process of using Bayesian statistical methods to classify documents into categories.

    * com_hashcashHashcash technology for Joomla Forcing the spammer to pay the price (computing power) before submitting rubish to Your homepage (comments, guestbook for example). The user will have to create a new cryptographic value of a hidden field (Javascript code provided) and that may take 1 to 2 seconds, but may be more with RSA 1024.... This also do not allow robot to easily submit code without parsing Your HTML page before... Hashcash definition: A sender of non-spam posting attached a hidden field from his post which proves that he has invested a modest amount of computer time into solving a small puzzle, often involving the recipient's email address. The receiver can, at negligible computational cost, verify that a sender had solved the puzzle. This can be regarded as a form of numerical stamp, where the 'cash' part is the effort invested by the sender. The theory is that spammers, whose business model relies on their ability to send large numbers of emails with very little cost per message, cannot afford this investment into each individual piece of spam they send. Receivers can verify whether a sender made such an investment and use the results to help filter email.

    * com_Log4phpConsistent and quality logging at a glance for JOOMLA Log4php is a php port of Log4j, the most popular Java logging framework (see Log4J for details). It has been packed for Joomla by me. Home of Log4PHP at Apache.logging * Configuration through xml and properties file (same structure as log4j). * File, RollingFile, DailyFile, Echo, Console, Mail, PEAR::Db, PHP error, Syslog or NT events and Socket appenders. * Simple, TTCC, Pattern, Html and Xml Layouts. * Nested (NDC) and Mapped (MDC) Diagnostic Contexts. * Switchable internal debug.

    * com_securityimagesSecurity Images or CAPTCHA for Joomla Ever been to a site where you had to register and the registration form required that you type in the same phrase that is found in a hard-to-read image? Joomla has now this possibility thanks to my component com_securityimages. CAPTCHA definition: A captcha (an acronym for "completely automated public Turing test to tell computers and humans apart") is a type of challenge-response test used in computing to determine whether or not the user is human. The term was coined in 2000 by Luis von Ahn, Manuel Blum, and Nicholas J. Hopper of Carnegie Mellon University, and John Langford of IBM. A common type of captcha requires that the user type the letters of a distorted and/or obscured sequence of letters or digits that appears on the screen.

    * com_joomlacloud Tag Cloud technology for Joomla A tag cloud (more traditionally known as a weighted list in the field of visual design) is a visual depiction of content tags used on a website. Often, more frequently used tags are depicted in a larger font or otherwise emphasized, while the displayed order is generally alphabetical. Thus both finding a tag by alphabet and by popularity is possible. Selecting a single tag within a tag cloud will generally lead to a collection of items that are associated with that tag.

    * And the number of pages known: {59900 sites} [Google] - {15200 sites} [Altavista],
    * The list of referer {HERE,} with some prestigious like www.xboxmediacenter.com
    * My Google Ranking: 5/10 which is huge for a personal page.
    * Domain: www.waltercedric.com is reserved till 2015

    Basically, I will have to go from a mutualised Server web hosting (45&euro;/yearly) to a Dedicated Server web hosting (159&euro;/monthly)

    Months Unique visitors Visites Pages Hits Bandwidth
    Jan 2006 25391 32363 123894 1861073 10.70 Gb

    {detailled statistics available here}, statistics from 2005 available

    If You want to
    * Sponsor me and take some of the costs of hosting, I will look carefully at all offers,
    * Have ideas on how to resolve this issue,
    * Have experience something similar,

    I stay in touch with my current provider : {www.cineteck-fr.com} and will hopefully have more info soon. Please come back soon. Thanks for your patience.


  • The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. from http://nl2.php.net/apc

    Links:
    Unpack your distribution file. You will have downloaded a file named something like apc_x.y.tar.gz. Unzip this file with a command like
    # wget http://pecl.php.net/get/APC-3.0.14.tgz
    # gunzip apc_x.y.tar.gz

    Next you have to untar it with
    #  tar xvf apc_x.y.tar

    This will create an apc_x.y directory. cd into this new directory:
    # cd apc_x.y

    phpize is a script that should have been installed with PHP, and is normally located in /usr/local/php/binassuming you installed PHP in /usr/local/php. (If you do not have the phpize script, you must reinstall PHP and be sure not to disable PEAR.).

    Locate phpize:
    # find / -name phpize

    mine is in
     /etc/alternatives/phpize
    yours may be in /usr/local/php/bin/phpize

    Run the phpize command:
    #  /usr/local/php/bin/phpize

    Its output should resemble this:
            Configuring for:
              PHP Api Version:   20020918
              Zend Module Api No:   20020429
              Zend Extension Api No:   20021010


    phpize should create a configure script in the current directory. If you get errors instead, you might be missing some required development tools, such as autoconf or libtool. You can try downloading the latest versions of those tools and running phpize again.

    Run the configure script.

    phpize creates a configure script. The only option you need to specify is the location of your php-config script.

    find location of php-config
    # find / -name php-config
    then
    # ./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/etc/alternatives/php-config

    php-config should be located in the same directory as phpize.
    If you prefer to use mmap instead of the default IPC shared memory support,  add --enable-apc-mmap to your configure line.

        If you prefer to use sysv IPC semaphores over the safer fcntl() locks, add --enable-sem to your configure line.  If you don't have a problem
        with your server segaulting, or any other unnatural accumulation of semaphores on your system, the semaphore based locking is slightly faster.

    Compile and install the files.
    Simply type:
    # make install
    Installing shared extensions:     /usr/lib/php5/extensions/


    Suggested Configuration (in your php.ini file)

      extension=apc.so
      apc.enabled=1
      apc.shm_segments=1
      apc.shm_size=128
      apc.ttl=7200
      apc.user_ttl=7200
      apc.num_files_hint=1024
      apc.mmap_file_mask=/tmp/apc.XXXXXX
      apc.enable_cli=1



    Although the default APC settings are fine for many installations, serious
    users should consider tuning the following parameters:

        OPTION                  DESCRIPTION
        ------------------      --------------------------------------------------
        apc.enabled             This can be set to 0 to disable APC. This is
                                primarily useful when APC is statically compiled
                                into PHP, since there is no other way to disable
                                it (when compiled as a DSO, the zend_extension
                                line can just be commented-out).
                                (Default: 1)

        apc.shm_segments        The number of shared memory segments to allocate
                                for the compiler cache. If APC is running out of
                                shared memory but you have already set
                                apc.shm_size as high as your system allows, you
                                can try raising this value.  Setting this to a
                                value other than 1 has no effect in mmap mode
                                since mmap'ed shm segments don't have size limits.
                                (Default: 1)

        apc.shm_size            The size of each shared memory segment in MB.
                                By default, some systems (including most BSD
                                variants) have very low limits on the size of a
                                shared memory segment.
                                (Default: 30)

        apc.optimization        This option has been deprecated.
                                (Default: 0)

        apc.num_files_hint      A "hint" about the number of distinct source files
                                that will be included or requested on your web
                                server. Set to zero or omit if you're not sure;
                                this setting is mainly useful for sites that have
                                many thousands of source files.
                                (Default: 1000)

        apc.user_entries_hint   Just like num_files_hint, a "hint" about the number
                                of distinct user cache variables to store.
                                Set to zero or omit if you're not sure;
                                (Default: 4096)

        apc.ttl                 The number of seconds a cache entry is allowed to
                                idle in a slot in case this cache entry slot is
                                needed by another entry.  Leaving this at zero
                                means that your cache could potentially fill up
                                with stale entries while newer entries won't be
                                cached.
                                (Default: 0)

        apc.user_ttl            The number of seconds a user cache entry is allowed
                                to idle in a slot in case this cache entry slot is
                                needed by another entry.  Leaving this at zero
                                means that your cache could potentially fill up
                                with stale entries while newer entries won't be
                                cached.
                                (Default: 0)


        apc.gc_ttl              The number of seconds that a cache entry may
                                remain on the garbage-collection list. This value
                                provides a failsafe in the event that a server
                                process dies while executing a cached source file;
                                if that source file is modified, the memory
                                allocated for the old version will not be
                                reclaimed until this TTL reached. Set to zero to
                                disable this feature.
                                (Default: 3600)

     apc.cache_by_default    On by default, but can be set to off and used in
                                conjunction with positive apc.filters so that files
                                are only cached if matched by a positive filter.
                                (Default: On)

        apc.filters             A comma-separated list of POSIX extended regular
                                expressions. If any pattern matches the source
                                filename, the file will not be cached. Note that
                                the filename used for matching is the one passed
                                to include/require, not the absolute path.  If the
                                first character of the expression is a + then the
                                expression will be additive in the sense that any
                                files matched by the expression will be cached, and
                                if the first character is a - then anything matched
                                will not be cached.  The - case is the default, so
                                it can be left off.
                                (Default: "")

        apc.mmap_file_mask      If compiled with MMAP support by using --enable-mmap
                                this is the mktemp-style file_mask to pass to the
                                mmap module for determing whether your mmap'ed memory
                                region is going to be file-backed or shared memory
                                backed.  For straight file-backed mmap, set it to
                                something like /tmp/apc.XXXXXX (exactly 6 X's).
                                To use POSIX-style shm_open/mmap put a ".shm"
                                somewhere in your mask.  eg.  "/apc.shm.XXXXXX"
                                You can also set it to "/dev/zero" to use your
                                kernel's /dev/zero interface to anonymous mmap'ed
                                memory.  Leaving it undefined will force an
                                anonymous mmap.
                                (Default: "")

        apc.slam_defense        ** DEPRECATED - Use apc.write_lock instead **
                                On very busy servers whenever you start the server or
                                modify files you can create a race of many processes
                                all trying to cache the same file at the same time.
                                This option sets the percentage of processes that will
                                skip trying to cache an uncached file.  Or think of it
                                as the probability of a single process to skip caching.
                                For example, setting this to 75 would mean that there is
                                a 75% chance that the process will not cache an uncached
                                file.  So the higher the setting the greater the defense
                                against cache slams.  Setting this to 0 disables this
                                feature.
                                (Default: 0)

        apc.file_update_protection
                                When you modify a file on a live web server you really
                                should do so in an atomic manner.  That is, write to a
                                temporary file and rename (mv) the file into its permanent
                                position when it is ready.  Many text editors, cp, tar and
                                other such programs don't do this.  This means that there
                                is a chance that a file is accessed (and cached) while it
                                is still being written to.  This file_update_protection
                                setting puts a delay on caching brand new files.  The
                                default is 2 seconds which means that if the modification
                                timestamp (mtime) on a file shows that it is less than 2
                                seconds old when it is accessed, it will not be cached.
                                The unfortunate person who accessed this half-written file
                                will still see weirdness, but at least it won't persist.
                                If you are certain you always atomically update your files
                                by using something like rsync which does this correctly, you
                                can turn this protection off by setting it to 0.  If you
                                have a system that is flooded with io causing some update
                                procedure to take longer than 2 seconds, you may want to
                                increase this a bit.
                                (Default: 2)

        apc.enable_cli          Mostly for testing and debugging.  Setting this enables APC
                                for the CLI version of PHP.  Normally you wouldn't want to
                                create, populate and tear down the APC cache on every CLI
                                request, but for various test scenarios it is handy to be
                                able to enable APC for the CLI version of APC easily.
                                (Default: 0)

        apc.max_file_size       Prevents large files from being cached.
                                (Default: 1M)

        apc.stat                Whether to stat the main script file and the fullpath
                                includes.  If you turn this off you will need to restart
                                                                                            

     apc.write_lock          On busy servers when you first start up the server, or when
                                many files are modified, you can end up with all your processes
                                trying to compile and cache the same files.  With write_lock
                                enabled, only one process at a time will try to compile an
                                uncached script while the other processes will run uncached
                                instead of sitting around waiting on a lock.
                                (Default: 1)

        apc.report_autofilter   Logs any scripts that were automatically excluded from being
                                cached due to early/late binding issues.
                                (Default: 0)

        apc.rfc1867             RFC1867 File Upload Progress hook handler is only available
                                if you compiled APC against PHP 5.2.0 or later.  When enabled
                                any file uploads which includes a field called
                                APC_UPLOAD_PROGRESS before the file field in an upload form
                                will cause APC to automatically create an upload_<key>
                                user cache entry where <key> is the value of the
                                APC_UPLOAD_PROGRESS form entry.

                                Note that the file upload tracking is not threadsafe at this
                                point, so new uploads that happen while a previous one is
                                still going will disable the tracking for the previous.
                                (Default: 0)

        apc.localcache          This enables a lock-free local process shadow-cache which
                                reduces lock contention when the cache is being written to.
                                (Default: 0)

        apc.localcache.size     The size of the local process shadow-cache, should be set to
                                a sufficently large value, approximately half of num_files_hint.
                                (Default: 512)

        apc.include_once_override
                                Optimize include_once and require_once calls and avoid the
                                expensive system calls used.
                                (Default: 0)