geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gao Yong Pan (JIRA)" <...@geronimo.apache.org>
Subject [jira] Commented: (GERONIMO-1223) Hot Deploy performance improvement Just check directories -patch available
Date Thu, 24 Nov 2005 08:45:56 GMT
    [ http://issues.apache.org/jira/browse/GERONIMO-1223?page=comments#action_12358453 ] 

Gao Yong Pan commented on GERONIMO-1223:
----------------------------------------

My performance measurement test is not for Hot Deploy, only for getLastModifiedInDir on an
existing directory, the percent number will have greate different and I think it depends on
how many files in the directory.

1) and 2) can't be tested due to the sub-task1( http://issues.apache.org/jira/browse/GERONIMO-1228
). 

Let's do a simple test now.

Create a directory named dir1 in the current directory sample like this,
[pgy@localhost sample]$ mkdir dir1
[pgy@localhost sample]$ stat dir1
  File: `dir1'
  Size: 48              Blocks: 0          IO Block: 131072 directory
Device: 303h/771d       Inode: 590636      Links: 2
Access: (0775/drwxrwxr-x)  Uid: (  512/     pgy)   Gid: (  512/     pgy)
Access: 2005-11-24 16:11:55.987833792 +0800
Modify: 2005-11-24 16:11:55.987833792 +0800
Change: 2005-11-24 16:11:55.987833792 +0800
[pgy@localhost sample]$ stat `pwd`                                               
  File: `/home/pgy/sample'
  Size: 72              Blocks: 0          IO Block: 131072 directory
Device: 303h/771d       Inode: 590627      Links: 3
Access: (0775/drwxrwxr-x)  Uid: (  512/     pgy)   Gid: (  512/     pgy)
Access: 2005-11-24 16:11:53.233252552 +0800
Modify: 2005-11-24 16:11:55.987833792 +0800
Change: 2005-11-24 16:11:55.987833792 +0800

Note: the modification time of dir1 and the current directory 'sample' is complete same.

Create a file under the directory dir1 with the name file1 now,
[pgy@localhost sample]$ touch dir1/file1                                         
[pgy@localhost sample]$ stat dir1/file1
  File: `dir1/file1'
  Size: 0               Blocks: 0          IO Block: 131072 regular empty file
Device: 303h/771d       Inode: 590648      Links: 1
Access: (0664/-rw-rw-r--)  Uid: (  512/     pgy)   Gid: (  512/     pgy)
Access: 2005-11-24 16:13:20.822936896 +0800
Modify: 2005-11-24 16:13:20.822936896 +0800
Change: 2005-11-24 16:13:20.822936896 +0800
[pgy@localhost sample]$ stat dir1                                                
  File: `dir1'
  Size: 72              Blocks: 0          IO Block: 131072 directory
Device: 303h/771d       Inode: 590636      Links: 2
Access: (0775/drwxrwxr-x)  Uid: (  512/     pgy)   Gid: (  512/     pgy)
Access: 2005-11-24 16:11:55.987833792 +0800
Modify: 2005-11-24 16:13:20.822936896 +0800
Change: 2005-11-24 16:13:20.822936896 +0800

Note: the modification time of file1 is complete same as its current directory dir1, of course
the modification time of the directory sample doesn't be updated.
So, we only need to check the modified time of files in the directory ${GeronimoHome}/deploy
and its sub directories, don' check the modification time of the files stored in the subdirectories.



> Hot Deploy performance improvement Just check directories -patch available
> --------------------------------------------------------------------------
>
>          Key: GERONIMO-1223
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1223
>      Project: Geronimo
>         Type: Improvement
>   Components: deployment
>     Versions: 1.0
>  Environment: linux or windows
>     Reporter: Gao Yong Pan
>  Attachments: DirectoryMonitor.java.patch
>
> The method getLastModifiedInDir in the hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java
is using the algorithm by calculating highest modified time of any files or directories, this
could be improved.
> In fact, we only need to check every directory is enough, because any changes, for example,
add, remove, edit any files in a directory, the change can be reflected by its current directory's
modification time, so  we don't need to check files.
> I also write a patch for the issue. A simple performance testing shows that the patch
will improve 58% of the performance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message