CURRENT branch and older OSes

Julien ÉLIE julien at trigofacile.com
Mon Nov 24 21:21:48 UTC 2008


Hi The Doctor,

>> I see trn gets the information for 4 or 5 groups per second.  Was it faster before?
>
> About 100 to 200 per second

I have just tried to send 100 consecutive "LIST ACTIVE fr.test" commands.
I do not see any difference:  5 seconds on my hardware.  It is the same time
for INN 2.5.0 and INN 2.4.5 (no change from INN 2.4.3 for LIST behaviour).

It is the same time for "GROUP fr.test" commands.

I do not understand where the difference comes from on your news server.
Did you try your trn on my news server "news.trigofacile.com"?


I used:

#!/bin/python

import socket
import time

HOTE = 'news.trigofacile.com'
PORT = 119
connexion = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connexion.connect((HOTE, PORT))
donnees = connexion.recv(1024)
print donnees
debut = time.time()
for i in xrange(0, 100):
    connexion.send('LIST ACTIVE fr.test\r\n')
    donnees = connexion.recv(1024)
    print donnees
fin = time.time()
print (fin - debut)
connexion.close()



Interesting to note:

for i in xrange(0, 100):
    connexion.send('LIST ACTIVE fr.test\r\n')
    donnees = connexion.recv(1024)
    print donnees

I receive packets (seen with Wireshark) like:

215 Newsgroups in form "group high low flags"\r\n
fr.test 0000008051 0000000001 y\r\n
.\r\n

5 seconds for 100 answers.


But:


for i in xrange(0, 100):
    connexion.send('LIST ACTIVE fr.test\r\n')
    donnees = connexion.recv(1024)
    print donnees
    donnees = connexion.recv(1024)
    print donnees

gives me two TCP packets:

215 Newsgroups in form "group high low flags"\r\n

and

fr.test 0000008051 0000000001 y\r\n
.\r\n

Then, it takes 30 seconds for 100 answers.  Six times slower.

I do not understand what Python does here with recv().  Calling it
a second time should not change the packets sent by the news server.

What strikes me most is that it does not work with INN 2.4.5 with
two recv():  the second one makes Python hang, waiting for date.
Whereas it works fine with INN 2.5, for which putting one or two
recv() works, and changes the number of received packets!
But three recv() do not work.

Any thoughts about that?

-- 
Julien ÉLIE

« Pourquoi les programmeurs confondent-ils Halloween et Noël ?
  Parce que OCT 31 == DEC 25. » 




More information about the inn-workers mailing list