diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2014-09-24 21:48:14 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2014-09-24 21:48:14 -0400 |
commit | 9c09bb4362955af2e81ea5c475cdb9ea166f6a31 (patch) | |
tree | f2f30cc2f3eabc3334d4b873cd96196963e9d365 | |
parent | 0808eb2a0e5b72903a8484728f94d49d8dbbad3d (diff) |
Set proper field data types to save space.
This patch resizes the field data types to match application
needs. This should reduce database size since most fields
get demoted to smaller sized data types.
-rw-r--r-- | rtss14/createtables.sql | 105 |
1 files changed, 56 insertions, 49 deletions
diff --git a/rtss14/createtables.sql b/rtss14/createtables.sql index a76a579..003fd73 100644 --- a/rtss14/createtables.sql +++ b/rtss14/createtables.sql | |||
@@ -1,5 +1,5 @@ | |||
1 | CREATE TABLE distrs( | 1 | CREATE TABLE distrs( |
2 | id INTEGER NOT NULL AUTO_INCREMENT, | 2 | id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, |
3 | name TEXT, | 3 | name TEXT, |
4 | PRIMARY KEY (id) | 4 | PRIMARY KEY (id) |
5 | ) ENGINE=InnoDB; | 5 | ) ENGINE=InnoDB; |
@@ -38,49 +38,56 @@ INSERT INTO distrs(name) VALUES('c-const-light'); | |||
38 | INSERT INTO distrs(name) VALUES('c-const-medium'); | 38 | INSERT INTO distrs(name) VALUES('c-const-medium'); |
39 | INSERT INTO distrs(name) VALUES('c-const-heavy'); | 39 | INSERT INTO distrs(name) VALUES('c-const-heavy'); |
40 | 40 | ||
41 | -- CREATE TABLE dp_id_gen( | ||
42 | -- id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
43 | -- PRIMARY KEY (id) | ||
44 | -- ) ENGINE=InnoDB; | ||
45 | -- ALTER TABLE dp_id_gen AUTO_INCREMENT=2; | ||
46 | |||
41 | CREATE TABLE dp_pending( | 47 | CREATE TABLE dp_pending( |
42 | id INTEGER NOT NULL AUTO_INCREMENT, | 48 | id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, |
43 | 49 | ||
44 | -- flag design point as taken | 50 | -- flag design point as taken. BIGINT for future-proofing |
45 | taken INTEGER, | 51 | taken BIGINT, |
46 | 52 | ||
47 | -- task set util cap | 53 | -- task set util cap |
48 | ts_util REAL, | 54 | ts_util REAL, |
49 | 55 | ||
50 | -- platform parameters | 56 | -- platform parameters |
51 | ncpu INTEGER, | 57 | ncpu SMALLINT UNSIGNED, |
52 | cpu_cluster_size INTEGER, | 58 | cpu_cluster_size SMALLINT UNSIGNED, |
53 | ngpu INTEGER, | 59 | ngpu SMALLINT UNSIGNED, |
54 | gpu_cluster_size INTEGER, | 60 | gpu_cluster_size SMALLINT UNSIGNED, |
55 | is_release_master INTEGER, | 61 | is_release_master BOOLEAN, |
56 | 62 | ||
57 | -- overheads config | 63 | -- overheads config |
58 | is_worst_case INTEGER, | 64 | is_worst_case BOOLEAN, |
59 | is_polluters INTEGER, | 65 | is_polluters BOOLEAN, |
60 | wss_size INTEGER, | 66 | wss_size INT UNSIGNED, |
61 | 67 | ||
62 | -- per task parameters | 68 | -- per task parameters |
63 | util_dist INTEGER REFERENCES distrs(id), | 69 | util_dist SMALLINT UNSIGNED REFERENCES distrs(id), |
64 | period_dist INTEGER REFERENCES distrs(id), | 70 | period_dist SMALLINT UNSIGNED REFERENCES distrs(id), |
65 | -- gpu data parameters | 71 | -- gpu data parameters |
66 | data_dist INTEGER REFERENCES distrs(id), | 72 | data_dist SMALLINT UNSIGNED REFERENCES distrs(id), |
67 | state_dist INTEGER REFERENCES distrs(id), | 73 | state_dist SMALLINT UNSIGNED REFERENCES distrs(id), |
68 | -- describe how work is distributed across processors | 74 | -- describe how work is distributed across processors |
69 | kernel_dist INTEGER REFERENCES distrs(id), -- % of job for kernels | 75 | kernel_dist SMALLINT UNSIGNED REFERENCES distrs(id), -- % of job for kernels |
70 | cpu_dist INTEGER REFERENCES distrs(id), -- % of remaining time for supporting cpu work | 76 | cpu_dist SMALLINT UNSIGNED REFERENCES distrs(id), -- % of remaining time for supporting cpu work |
71 | 77 | ||
72 | -- task set parameters | 78 | -- task set parameters |
73 | gpu_population REAL, -- % of tasks in TS that use GPUs | 79 | gpu_population REAL, -- % of tasks in TS that use GPUs |
74 | 80 | ||
75 | -- gpusync config parameters | 81 | -- gpusync config parameters |
76 | rho INTEGER, | 82 | rho TINYINT, |
77 | is_dgl INTEGER, | 83 | is_dgl BOOLEAN, |
78 | is_p2p INTEGER, | 84 | is_p2p BOOLEAN, |
79 | ncopy_engines INTEGER, | 85 | ncopy_engines TINYINT UNSIGNED, |
80 | chunk_size INTEGER, | 86 | chunk_size INT UNSIGNED, |
81 | 87 | ||
82 | PRIMARY KEY (id), | 88 | PRIMARY KEY (id), |
83 | INDEX (id, taken), | 89 | INDEX (id, taken), |
90 | INDEX (taken), | ||
84 | INDEX (ts_util) | 91 | INDEX (ts_util) |
85 | -- every permutation marks a unique configuration | 92 | -- every permutation marks a unique configuration |
86 | -- PRIMARY KEY(ts_util, | 93 | -- PRIMARY KEY(ts_util, |
@@ -94,39 +101,39 @@ CREATE TABLE dp_pending( | |||
94 | -- partially tested dps | 101 | -- partially tested dps |
95 | CREATE TABLE dp_ptested( | 102 | CREATE TABLE dp_ptested( |
96 | -- auto-computed unique id for this | 103 | -- auto-computed unique id for this |
97 | id INTEGER NOT NULL AUTO_INCREMENT, | 104 | id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, |
98 | 105 | ||
99 | -- platform parameters | 106 | -- platform parameters |
100 | ncpu INTEGER, | 107 | ncpu SMALLINT UNSIGNED, |
101 | cpu_cluster_size INTEGER, | 108 | cpu_cluster_size SMALLINT UNSIGNED, |
102 | ngpu INTEGER, | 109 | ngpu SMALLINT UNSIGNED, |
103 | gpu_cluster_size INTEGER, | 110 | gpu_cluster_size SMALLINT UNSIGNED, |
104 | is_release_master INTEGER, | 111 | is_release_master BOOLEAN, |
105 | 112 | ||
106 | -- overheads config | 113 | -- overheads config |
107 | is_worst_case INTEGER, | 114 | is_worst_case BOOLEAN, |
108 | is_polluters INTEGER, | 115 | is_polluters BOOLEAN, |
109 | wss_size INTEGER, | 116 | wss_size INT UNSIGNED, |
110 | 117 | ||
111 | -- per task parameters | 118 | -- per task parameters |
112 | util_dist INTEGER REFERENCES distrs(id), | 119 | util_dist SMALLINT UNSIGNED REFERENCES distrs(id), |
113 | period_dist INTEGER REFERENCES distrs(id), | 120 | period_dist SMALLINT UNSIGNED REFERENCES distrs(id), |
114 | -- gpu data parameters | 121 | -- gpu data parameters |
115 | data_dist INTEGER REFERENCES distrs(id), | 122 | data_dist SMALLINT UNSIGNED REFERENCES distrs(id), |
116 | state_dist INTEGER REFERENCES distrs(id), | 123 | state_dist SMALLINT UNSIGNED REFERENCES distrs(id), |
117 | -- describe how work is distributed across processors | 124 | -- describe how work is distributed across processors |
118 | kernel_dist INTEGER REFERENCES distrs(id), -- % of job for kernels | 125 | kernel_dist SMALLINT UNSIGNED REFERENCES distrs(id), -- % of job for kernels |
119 | cpu_dist INTEGER REFERENCES distrs(id), -- % of remaining time for supporting cpu work | 126 | cpu_dist SMALLINT UNSIGNED REFERENCES distrs(id), -- % of remaining time for supporting cpu work |
120 | 127 | ||
121 | -- task set parameters | 128 | -- task set parameters |
122 | gpu_population REAL, -- % of tasks in TS that use GPUs | 129 | gpu_population REAL, -- % of tasks in TS that use GPUs |
123 | 130 | ||
124 | -- gpusync config parameters | 131 | -- gpusync config parameters |
125 | rho INTEGER, | 132 | rho TINYINT, |
126 | is_dgl INTEGER, | 133 | is_dgl BOOLEAN, |
127 | is_p2p INTEGER, | 134 | is_p2p BOOLEAN, |
128 | ncopy_engines INTEGER, | 135 | ncopy_engines TINYINT UNSIGNED, |
129 | chunk_size INTEGER, | 136 | chunk_size INT UNSIGNED, |
130 | 137 | ||
131 | PRIMARY KEY (id) | 138 | PRIMARY KEY (id) |
132 | -- every permutation marks a unique configuration | 139 | -- every permutation marks a unique configuration |
@@ -138,13 +145,13 @@ CREATE TABLE dp_ptested( | |||
138 | ) ENGINE=InnoDB; | 145 | ) ENGINE=InnoDB; |
139 | 146 | ||
140 | CREATE TABLE sched_results( | 147 | CREATE TABLE sched_results( |
141 | dp INTEGER, | 148 | dp BIGINT UNSIGNED, |
142 | ts_util REAL, | 149 | ts_util REAL, |
143 | 150 | ||
144 | -- standard schedulability results | 151 | -- standard schedulability results |
145 | sched REAL, | 152 | sched REAL, |
146 | ntested INTEGER, | 153 | ntested BIGINT UNSIGNED, |
147 | nsched INTEGER, | 154 | nsched BIGINT UNSIGNED, |
148 | 155 | ||
149 | -- qualities of schedulable task sets | 156 | -- qualities of schedulable task sets |
150 | avg_tard REAL, | 157 | avg_tard REAL, |
@@ -156,12 +163,12 @@ CREATE TABLE sched_results( | |||
156 | ) ENGINE=InnoDB; | 163 | ) ENGINE=InnoDB; |
157 | 164 | ||
158 | CREATE TABLE scaled_sched_results( | 165 | CREATE TABLE scaled_sched_results( |
159 | dp INTEGER, | 166 | dp BIGINT UNSIGNED, |
160 | eff_ts_util REAL, | 167 | eff_ts_util REAL, |
161 | scale_factor REAL, -- scaling factor used to compute eff_util | 168 | scale_factor REAL, -- scaling factor used to compute eff_util |
162 | 169 | ||
163 | ntested INTEGER, | 170 | ntested BIGINT UNSIGNED, |
164 | nsched INTEGER, | 171 | nsched BIGINT UNSIGNED, |
165 | 172 | ||
166 | avg_sched REAL, -- just nsched/ntested | 173 | avg_sched REAL, -- just nsched/ntested |
167 | avg_tard REAL, | 174 | avg_tard REAL, |