2010년 2월 4일 목요일

Oracle v$sqlarea 메모

1. BUFFER_GETS의 값이 큰 SQL (200,000 이상?)

logical read 큰 SQL

(1) index로 잡은 컬럼에 distinct 값이 적음. 부적절한(과도한?) index 사용

(2) 최적화 되지 않은 SQL 문

 

2. DISK_READS 값이 큰 SQL (10,000 이상?)

(1) 최적화 안된 SQL, disk read 많음 (index가 없거나...)

(2) db_block_buffers 또는 shared_pool_size 작게 설정된 경우 (메모리 작음)

 

출처: 어느 분 블로그에서 읽고 관심 부분만 얼른 수첩에 적었음. 어느 분인지는 기억 안남. (죄송)

2009년 6월 5일 금요일

IBM JVM 1.4에서 Initial 및 Maximum Heap size 설정 (Java Diagnostics Guide 문서)

Initial and maximum heap sizes

When you have established the maximum heap size that you need, you might want to set the minimum heap size to the same value; for example, -Xms 512M -Xmx 512M. Using the same values is not usually a good idea, because it delays the start of garbage collection until the heap is full. The first time that the Garbage Collector runs, therefore, becomes a very expensive operation. Also, the heap is most likely to be very fragmented when a need to do a heap compaction occurs. Again, this is a very expensive operation. The recommendation is to start your application with the minimum heap size that it needs. When it starts up, the Garbage Collector will run often and, because the heap is small, efficiently.


The Garbage Collector takes these steps:

  1. If the Garbage Collector finds enough garbage, it exits.

    If it cannot find enough garbage, it goes to the next step.

  2. The Garbage Collector runs compaction.

    If it cannot find enough garbage, it goes to the next step.

  3. The Garbage collector expands the heap.


Therefore, an application normally runs until the heap is full. Then, successive garbage collection cycles recover garbage. When the heap is full of reachable objects, the Garbage Collector compacts the heap. If and when the heap is full of reachable objects and cannot be compacted, the Garbage Collector expands the heap size.


From the above description, you can see that the Garbage Collector compacts the heap as the needs of the application rise, so that as the heap expands, it expands with a set of compacted objects in the bottom of the original heap. This is an efficient way to manage the heap, because compaction runs on the smallest-possible heap size at the time that compaction is found to be necessary. Compaction is performed with the minimum heap sizes as the heap grows. Some evidence exists that an application's initial set of objects tends to be the key or root set, so that compacting them early frees the remainder of the heap for more short-lived objects.


Eventually, the JVM has the heap at maximum size with all long-lived objects compacted at the bottom of the heap. The compaction occurred when compaction was in its least expensive phase. The overheads of expanding the heap are almost trivial compared to the cost of collecting and compacting a very large fragmented heap.


원문: http://publib.boulder.ibm.com/infocenter/javasdk/v1r4m2/index.jsp?topic=/com.ibm.java.doc.diagnostics.142/html/initandmaxheapsizes.html

2009년 3월 26일 목요일

성능(부하) 테스트 시 제니퍼의 액티브 서비스 제한 기능

Jennifer에 있는 Active Service 제한 기능(PLC; Peak Load Control)이 켜져 있으면 어느 이상 부하가 증가하면
사용자에게 "Workload so high. Your request rejected. Try again later! -jennifer-" 메시지를 내보낸다.

이 기능이 켜져 있으면 부하테스트 시 정해진 수 이상의 부하를 넣을 수 없으므로 기능을 끄고 테스트를 수행한다.

[설정 방법]
Jennifer 콘솔 화면에서 "구성관리"->"서버관리"로 들어가서 해당 서버에 대하여 다음과 같이 설정 변경

set_limit_active_service = false

(만약 enable_dump_triggering 항목이 있다면 그것도 false로 설정)

수정 후 화면 아래쪽 적용 버튼 눌러 변경 사항 적용.

2009년 3월 1일 일요일

책 메모 - 자바 성능을 결정짓는 코딩 습관과 튜닝 이야기

어렵거나 새로운 내용은 아니지만 전체적으로 자바 어플리케이션의 성능과 관련된 점검 사항을 개괄할 수 있게 해줘 가볍게, 재미있게 읽을 수 있었다.

읽으면서 메모.

[디자인 패턴]
 - Core J2EE Patterns
 - Transfer Object, Service Locator, Business Delegate, Session Facade, Data Access Object

[Garbage Collection]
 - http://java.sun.com/javase/technologies/hotspot/gc/index.jsp
 - memorymanagement_whitepaper.pdf
 - http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

[JVM Profiler]
 - TPTP (Eclipse Test & Performance Tools Platform)

[Thread Programming]
 - http://java.sun.com/docs/books/tutorial/essential/concurrency/highlevel.html

[NIO]
 - http://java.sun.com/developer/technicalArticles/releases/nio/


[Logger]
 - http://java.sun.com/javase/6/docs/technotes/guides/logging/overview.html

[Monitoring]
jvmstat (jps, jstat, jstatd, visualgc)

verbosegc (PrintGCTimeStamps, PringHeapAtGC, PrintGCDetails)
 - Sun GC Analyzer
 - IBM Pattern Modeling and Analysis Tool for Java Gabage Collector (IBM PMAT) http://www.alphaworks.ibm.com/tech/pmat
 - HPjmeter

JMX
 - JMX Architecture
 - MBean
 - JConsole
    remote option
    -Dcom.sun.management.jmxremote.port={number}
    -Dcom.sun.management.jmxremote.ssl={false/true}
    -Dcom.sun.management.jmxremote.authenticate={false/true}
    -Dcom.sun.management.jmxremote.password.file={path/conf/jmxremote.password}
    -Dcom.sun.management.jmxremote.access.file={path/conf/jmxremote.access}

[Web Log]
 - Analog: http://www.alanog.cx
 - Webalizer: http://www.mrunix.net/webalizer
 - AWStats: http://awstats.sourceforge.net (ActivePerl 설치 필요; http://www.activestate.com)

[Trouble Shooting Hint]
 - http://java.sun.com/javase/6/webnotes/trouble/other/matrix6-Windows.html
 - http://java.sun.com/javase/6/webnotes/trouble/other/matrix6-Unix.html
 - -Xincgc
 - -Xss (unable to create new native thread)


(본문 일부를 적었다가 출판사에서 저작권 관련 주의 글을 올려주셔서 책의 고유한 부분이라 생각되는 부분을 삭제하고 참고 사이트 링크 등만 남겨두었음)

2008년 9월 25일 목요일

[PC 팁] Windows XP 의 로그온 대기 화면에 읽지않은 메일 개수 나오지 않게 하기

레지스트리 dword 값 추가.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\UnreadMail 에
MessageExpiryDays 값(dword) 추가. 데이터는 0로 설정.