- Notifications
You must be signed in to change notification settings - Fork 849
/
Copy pathmemtest.sql
84 lines (71 loc) · 3.5 KB
/
memtest.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
REM
REM
REM ------------------------------------------------------------------------------
REM Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
REM
REM Portions Copyright 2006-2015, Kuassi Mensah. All rights reserved.
REM https://www.amazon.com/dp/1555583296
REM
REM ------------------------------------------------------------------------------
REM DESCRIPTION
REM
REM The following code sample is provided for illustration purposes only.
REM The default values should work for most applications.
REM Before altering these values for your production system, please
REM test beforehand
REM
create or replace and resolve java source named memtest as
import oracle.aurora.vm.OracleRuntime;
public class memtest
{
public static void Tests ()
{
System.out.println("getSessionSize(): "
+OracleRuntime.getSessionSize());
System.out.println("Old NewspaceSize(): "
+OracleRuntime.getNewspaceSize());
OracleRuntime.setNewspaceSize(2*OracleRuntime.getNewspaceSize());
System.out.println("New NewspaceSize(): "
+OracleRuntime.getNewspaceSize());
System.out.println("Old MaxRunspaceSize(): "
+OracleRuntime.getMaxRunspaceSize());
OracleRuntime.setMaxRunspaceSize(2*OracleRuntime.getMaxRunspaceSize());
System.out.println("New MaxRunspaceSize(): "
+OracleRuntime.getMaxRunspaceSize());
System.out.println("getJavaPoolSize(): "
+OracleRuntime.getJavaPoolSize());
System.out.println("getSessionSoftLimit(): "
+OracleRuntime.getSessionSoftLimit());
System.out.println("Old SessionGCThreshold(): "
+OracleRuntime.getSessionGCThreshold());
OracleRuntime.setSessionGCThreshold(2*OracleRuntime.getSessionGCThreshold());
System.out.println("New SessionGCThreshold(): "
+OracleRuntime.getSessionGCThreshold());
System.out.println("Old NewspaceSize: "+OracleRuntime.getNewspaceSize());
OracleRuntime.setNewspaceSize(2*OracleRuntime.getNewspaceSize());
System.out.println("New NewspaceSize: "+OracleRuntime.getNewspaceSize());
System.out.println("Old MaxMemsize: "+OracleRuntime.getMaxMemorySize());
OracleRuntime.setMaxMemorySize(2*OracleRuntime.getMaxMemorySize());
System.out.println("New MaxMemsize: "+OracleRuntime.getMaxMemorySize());
System.out.println("Old JavaStackSize(): "
+OracleRuntime.getJavaStackSize());
OracleRuntime.setJavaStackSize(2*OracleRuntime.getJavaStackSize());
System.out.println("New JavaStackSize(): "
+OracleRuntime.getJavaStackSize());
System.out.println("Old ThreadStackSize(): "
+OracleRuntime.getThreadStackSize());
OracleRuntime.setThreadStackSize(2*OracleRuntime.getThreadStackSize());
System.out.println("New ThreadStackSize(): "
+OracleRuntime.getThreadStackSize());
}
}
/
show errors;
create or replace procedure memtests
as language java name
'memtest.Tests()';
/
show errors;
set serveroutput on
Call dbms_java.set_output(50000);
call memtests();