I'm testing a perl script that runs on a Solaris 8 mail server to read
Unix mailbox files and append the messages to Cyrus mailboxes.  I need
to do this for 17000 mailboxes, and it's way too slow.  The server is
pretty much idle.  Neither the perl script nor the imapd process are
CPU or I/O bound.  When I truss the two processes, both have long
delays were nothing is happening.

In the case of the perl script, there is about a tenth of a second
delay between the time it sends a command to the IMAP server and
gets a response back:

 1.5735 write(6, " 1 1 7   a p p e n d   u".., 39)      = 39
 1.5738 write(6, "\r\n", 2)                             = 2
 1.6709 read(6, " +   g o   a h e a d\r\n", 8192)       = 12

In the case of imapd, there is a corresponding delay around the
poll() system call:

 0.0485 stat("/imap/conf/quota/H/user.hkunkel", 0xFFBEDA74) = 0
 0.0487 fstat(21, 0xFFBECA28)                           = 0
 0.0489 mmap(0x00000000, 14, PROT_READ, MAP_SHARED, 21, 0) = 0xFEDF0000
 0.0491 munmap(0xFEDF0000, 14)                          = 0
 0.0492 time()                                          = 1001894779
 0.1352 poll(0xFFBEEAD0, 1, 281000)                     = 1
 0.1356 time()                                          = 1001894779
 0.1357 read(0, "\r\n", 4096)                           = 2
 0.1360 time()                                          = 1001894779
 0.1362 write(1, " +   g o   a h e a d\r\n", 12)        = 12

Could this be a TCP/IP delay?  The perl script is connected to
localhost.  Could the Solaris 8 poll() system call have a built-in
delay?  Is this all quite normal, and just shows up because I'm
doing the load serially?

I need a lot more throughput somehow.  Unless I can find another
solution, I'll have to run a bunch of separate processes in parallel
to do the mailbox load.


-- 
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

Reply via email to