On 25 Apr 2001 16:42:49 +0300, [EMAIL PROTECTED] wrote:
>
> Tocmai eram in dilema daca sa schimb bind-ul pe un freeBSD, ceva "updates"
> la testele de care ziceti?
Pe-aproape. Nu am numere, sau mai precis nu am numere complete - n-am
testat decit dnscache vs. bind (deci doar functia de resolver), nu si
tinydns vs. bind (deci nu am testat functia de nameserver). Chiar si
asa, am numere doar pentru dnscache.
Oricum, cred ca incep sa-mi formez o idee.
Se pare ca sub incarcare zdravana, programele din pachetul djbdns se
comporta clar mai bine.
Sub incarcare moderata sau usoara, ceea ce probabil va fi si cazul tau
(nu stiu la voi cum e, dar toata reteaua SGI nu reuseste sa treaca CPU
usage peste 1.0% pe un triplet de resolvere externe), s-ar putea ca in
anumite conditii dnscache sa fie usor mai lent ca bind. Nu bag mina in
foc ca-i asa, trebuie sa trec si logurile lui bind prin analizor, asa ca
pune informatia asta sub rezerva.
Insa smecheria cea mai tare, pe linga care orice cistig/pierdere de
viteza este vax, este ca dnscache nu crede informatiile
non-authoritative, ci merge intotdeauna la autoritate. Chestia asta este
enorm de importanta, pentru ca te protejeaza de cache-poisoning si alte
porcarii pe care le face crackeru' chinez. Bind face o faza nashpa: ca
sa accelereze rezolvarea, accepta non-authoritative, ceea ce e o
timpenie.
In plus, securitatea in sine a programului este net mai buna la djbdns.
Eu zic ca este un avantaj clar de partea lui djbdns. Upgradeaza, pentru
ca-i bine. ;-) Eu am luat deja decizia fara sa mai astept analiza
logurilor lui bind (dar am s-o fac totusi si pe aia).
Bind sucks.
Am atasat la mesaj script-ul pe care l-am scris ca sa analizez logurile
lui dnscache. Il rulezi cu "script logfile" si-ti da urmatoarele
statistici:
- cite query-uri au primit raspuns mai repede de 1 secunda, cite au
primit raspuns intre 1...2 sec, cite intre 2...3, cite 3...4 etc.etc.
- acelasi lucru, dar mai detaliat, pentru primele 10 secunde: cite intre
0.0...0.1, cite intre 0.1...0.2 s.a.m.d.
Timpul este masurat intre momentul cind query-ul de la client ajunge la
cache, si momentul cind raspunsul final este trimis inapoi catre client.
Nu se face distinctie intre query-urile rezolvate cu succes, si cele
care dau fail (din cauza asta vor apare ceva valori mari aberante - alea
sint failure-urile).
Am atasat si un sample din resolverele noastre, luat din logurile unuia
din rezolvere azi 25 aprilie intre 12:00 si 13:30 (deci la ora de virf),
ca sa vezi cum arata statistica pentru dnscache.
--
Florin Andrei
"Bloat is not about being big. Bloat is about being slow and stupid and not
realizing that it's because of design mistakes." - Linus Torvalds
-- Attached file included as plaintext by Listar --
#!/usr/bin/php -q
<?php
// set the real name of the dnscache logfile
$rf = "orig.log";
// maximum timeout accepted (seconds)
$n = 500;
// initialize statistics array
for ($i=0; $i<$n; $i++) {
$dist[$i] = 0;
};
// initialize split-second statistics array
// (only first 10 seconds, increment = .1)
for ($i=0; $i<100; $i++) {
$mdist[$i] = 0;
};
// yeah ;-)
$file = fopen($rf, "r");
while (!feof ($file)) {
$line = fgets($file, 4096);
// get the "action" (query or sent)
$action = substr($line, 26, 4);
if ($action == "quer") {
// get the integer part of the timestamp
$time = substr($line, 9, 8);
// get the decimal part of the timestamp
// (we need this to be separate because PHP doesn't
// play well with really big integers)
$time_dec = substr($line, 17, 8);
$end_label = strpos($line, " ", 32);
// get the label of the query
$label = substr($line, 32, ($end_label - 32));
// put int time into mem
$req[$label][0] = "0x" . $time;
// put dec time into mem
$req[$label][1] = "0x" . $time_dec;
// echo "$time query $label\n";
};
if ($action == "sent") {
// get the integer part of the timestamp
$time = substr($line, 9, 8);
// get the decimal part of the timestamp
// (we need this to be separate because PHP doesn't
// play well with really big integers)
$time_dec = substr($line, 17, 8);
$end_label = strpos($line, " ", 31);
// get the label of the query
$label = substr($line, 31, ($end_label - 31));
// put int time into mem
$req[$label][2] = "0x" . $time;
// put dec time into mem
$req[$label][3] = "0x" . $time_dec;
// compute integer part of the delay
$diff = $req[$label][2] - $req[$label][0];
// compute decimal part of the delay
$diff_dec = $req[$label][3] - $req[$label][1];
$delay = $diff + $diff_dec/1000000000;
// yeah, big integers suck
$integ = floor($delay);
// yet another query for this group of values
++$dist[$integ];
// if we're under 10 seconds
if ($integ<10) {
$minteg = floor(10 * ($delay - $integ));
$mindex = $minteg + 10 * $integ;
++$mdist[$mindex];
};
};
}
// it's nice to do this
fclose ($file);
echo "Statistical distribution in time for all queries:\n";
echo "=================================================\n\n";
echo "sec no. of queries\n";
echo "--- --------------\n";
for ($i=0; $i<$n; $i++) {
echo "$i $dist[$i]\n";
};
echo "\n\n\n";
echo "Detailed analysis for the first 10 seconds:\n";
echo "===========================================\n\n";
echo "sec no. of queries\n";
echo "--- --------------\n";
for ($i=0; $i<100; $i++) {
$j = floor($i/10);
$k = $i - 10 * $j;
echo $j;
echo ".";
echo $k;
echo " $mdist[$i]\n";
};
?>
-- Attached file included as plaintext by Listar --
Statistical distribution in time for all queries:
=================================================
sec no. of queries
--- --------------
0 13144
1 441
2 74
3 21
4 7
5 12
6 8
7 2
8 11
9 2
10 5
11 12
12 11
13 5
14 2
15 5
16 3
17 0
18 0
19 20
20 2
21 1
22 15
23 4
24 1
25 3
26 1
27 3
28 0
29 0
30 11
31 4
32 0
33 0
34 1
35 49
36 1
37 0
38 2
39 0
40 0
41 0
42 0
43 0
44 0
45 4
46 0
47 0
48 0
49 1
50 0
51 0
52 0
53 1
54 1
55 1
56 1
57 1
58 1
59 1
60 41
61 52
62 5
63 3
64 1
65 1
66 0
67 0
68 1
69 0
70 0
71 154
72 4
73 0
74 11
75 120
76 4
77 3
78 1
79 0
80 1
81 0
82 0
83 0
84 0
85 0
86 0
87 0
88 0
89 0
90 5
91 1
92 0
93 0
94 1
95 1
96 2
97 7
98 8
99 8
100 3
101 3
102 0
103 0
104 0
105 0
106 0
107 0
108 0
109 0
110 0
111 0
112 0
113 0
114 0
115 0
116 91
117 3
118 0
119 4
120 2624
121 32
122 26
123 1
124 1
125 0
126 0
127 0
128 0
129 0
130 0
131 39
132 4
133 0
134 9
135 2
136 0
137 0
138 0
139 9
140 14
141 10
142 20
143 33
144 28
145 13
146 1
147 0
148 0
149 0
150 0
151 0
152 0
153 0
154 1
155 0
156 0
157 0
158 0
159 0
160 0
161 0
162 0
163 0
164 0
165 2
166 0
167 0
168 0
169 0
170 0
171 0
172 0
173 0
174 0
175 0
176 0
177 1
178 0
179 0
180 31
181 0
182 2
183 1
184 1
185 0
186 0
187 1
188 0
189 1
190 0
191 0
192 0
193 0
194 0
195 0
196 0
197 0
198 0
199 0
200 0
201 0
202 0
203 0
204 0
205 0
206 0
207 0
208 0
209 0
210 11
211 0
212 0
213 0
214 0
215 0
216 0
217 0
218 0
219 0
220 0
221 0
222 0
223 0
224 0
225 0
226 0
227 0
228 0
229 0
230 0
231 0
232 0
233 0
234 0
235 0
236 0
237 0
238 0
239 0
240 46
241 17
242 8
243 11
244 11
245 4
246 1
247 0
248 0
249 0
250 0
251 0
252 0
253 0
254 0
255 0
256 0
257 0
258 0
259 0
260 0
261 0
262 6
263 0
264 0
265 0
266 0
267 0
268 0
269 0
270 0
271 0
272 0
273 0
274 0
275 0
276 0
277 0
278 0
279 0
280 0
281 0
282 0
283 0
284 0
285 0
286 0
287 0
288 0
289 0
290 0
291 0
292 0
293 0
294 0
295 0
296 0
297 0
298 0
299 0
300 0
301 0
302 0
303 0
304 0
305 0
306 0
307 0
308 0
309 0
310 0
311 0
312 0
313 0
314 0
315 0
316 0
317 0
318 0
319 0
320 0
321 0
322 0
323 0
324 0
325 0
326 0
327 0
328 0
329 0
330 0
331 0
332 0
333 0
334 0
335 0
336 0
337 0
338 0
339 0
340 0
341 0
342 0
343 0
344 0
345 0
346 0
347 0
348 0
349 0
350 0
351 0
352 0
353 0
354 0
355 0
356 0
357 0
358 0
359 0
360 0
361 0
362 0
363 0
364 0
365 0
366 0
367 0
368 0
369 0
370 0
371 0
372 0
373 0
374 0
375 0
376 0
377 0
378 0
379 0
380 0
381 0
382 0
383 0
384 0
385 0
386 0
387 0
388 0
389 0
390 0
391 0
392 0
393 0
394 0
395 0
396 0
397 0
398 0
399 0
400 0
401 0
402 0
403 0
404 0
405 0
406 0
407 0
408 0
409 0
410 0
411 0
412 0
413 0
414 0
415 0
416 0
417 0
418 0
419 0
420 0
421 0
422 0
423 0
424 0
425 0
426 0
427 0
428 0
429 0
430 0
431 0
432 0
433 0
434 0
435 0
436 0
437 0
438 0
439 0
440 0
441 0
442 0
443 0
444 0
445 0
446 0
447 0
448 0
449 0
450 0
451 0
452 0
453 0
454 0
455 0
456 0
457 0
458 0
459 0
460 0
461 0
462 0
463 0
464 0
465 0
466 0
467 0
468 0
469 0
470 0
471 0
472 0
473 0
474 0
475 0
476 0
477 0
478 0
479 0
480 19
481 0
482 0
483 0
484 0
485 0
486 0
487 0
488 0
489 0
490 0
491 0
492 0
493 0
494 0
495 0
496 0
497 0
498 0
499 0
Detailed analysis for the first 10 seconds:
===========================================
sec no. of queries
--- --------------
0.0 9554
0.1 1872
0.2 902
0.3 369
0.4 182
0.5 119
0.6 57
0.7 45
0.8 23
0.9 21
1.0 76
1.1 135
1.2 100
1.3 41
1.4 31
1.5 20
1.6 16
1.7 7
1.8 4
1.9 11
2.0 11
2.1 16
2.2 11
2.3 9
2.4 4
2.5 7
2.6 4
2.7 6
2.8 1
2.9 5
3.0 3
3.1 3
3.2 6
3.3 2
3.4 2
3.5 1
3.6 2
3.7 0
3.8 2
3.9 0
4.0 0
4.1 1
4.2 2
4.3 0
4.4 0
4.5 1
4.6 1
4.7 0
4.8 0
4.9 2
5.0 0
5.1 3
5.2 1
5.3 2
5.4 0
5.5 0
5.6 2
5.7 2
5.8 1
5.9 1
6.0 1
6.1 1
6.2 3
6.3 1
6.4 0
6.5 0
6.6 0
6.7 1
6.8 0
6.9 1
7.0 0
7.1 0
7.2 2
7.3 0
7.4 0
7.5 0
7.6 0
7.7 0
7.8 0
7.9 0
8.0 0
8.1 1
8.2 3
8.3 4
8.4 0
8.5 0
8.6 2
8.7 0
8.8 1
8.9 0
9.0 0
9.1 0
9.2 0
9.3 2
9.4 0
9.5 0
9.6 0
9.7 0
9.8 0
9.9 0
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.