A sa follow up to these tests, I replaced the data file from it's mixed content with an EXE file. Specifically the Notepad++ installer, version 5.9.3 which is 5,554,176 bytes.
I picked it because it is close in size to the other file so see if anything jumps out. It does. The EXE installer (renamed to just "exetest.bin") replicated in about 6 seconds using both "localhosts" "source" : "http://localhost:5984/from" "target" : "http://localhost:5984/to" I find this rather amazing. So I placed the original mixed content file into a ZIP file. File is a ZIP is 2,107,241, or about half the size. And retested them one after the other. "source" : "http://localhost:5984/from" "target" : "http://localhost:5984/to" Original file was still 60 seconds The zipped file was 1.25 seconds Even more amazing. So this is something else to contemplate. I will post the files if anyone wants copies. -Scott ----- Original Message ----- From: Scott Weber <[email protected]> To: "[email protected]" <[email protected]> Cc: Sent: Friday, January 24, 2014 3:03 PM Subject: Re: Replication of attachment is extremely slow.. LOGGED INFORMATION Ah. Now we have something. It was really easy to change the PHP script and re-run the batch file. Over and over. So I have a bunch of tests. When the script was modified to use only the names "to" and "from" It worked fast... Really fast. But any combination of the "localhost" was very long. "source" : "http://localhost:5984/from" "target" : "http://localhost:5984/to" 60 seconds "source" : "http://localhost:5984/from" "target" : "to" 60 seconds "source" : "from" "target" : "http://localhost:5984/to" 40 seconds "source" : "from" "target" : "to" 2 seconds Replacing "localhost" with 127.0.0.1 cut about 10 seconds off. "source" : "http://127.0.0.1:5984/from" "target" : "http://127.0.0.1:5984/to" 60 seconds (well, it didn't cut any time off this one) "source" : "http://127.0.0.1:5984/from" "target" : "to" 40 seconds "source" : "from" "target" : "http://127.0.0.1:5984/to" 30 seconds And lastly: "source" : "http://localhost:5984/from" "target" : "http://127.0.0.1:5984/to" 60 seconds So localhost is basically the same as 127.0.0.1. And any permutation of using the url causes delays. Sounds like it should fall under "also fun". Thanks so far. It appears this may be solvable. -Scott ----- Original Message ----- From: Paul Davis <[email protected]> To: "[email protected]" <[email protected]>; Scott Weber <[email protected]> Cc: "[email protected]" <[email protected]> Sent: Friday, January 24, 2014 2:25 PM Subject: Re: Replication of attachment is extremely slow.. LOGGED INFORMATION The important thing to note here is that test 1 is using URLs for databases where tests 2 and 3 are using internal replication. Reading the logs it shows that the request to write the attachment took about 72 seconds. Out of curiosity could you rerun test 3 twice more with the following JSON bodies: {"from":"http://localhost:5984/from", "to":"to"} {"from":"from", "to":"http://localhost:5984/to"} This should narrow down if there's a problem with reading attachments, writing attachments, or some weird interplay between reading and writing attachments. If it turns out that the only slow version is when both are using the "http://localhost:5984/dbname" versions then can you run one more test: {"from":"http://127.0.0.1:5984/from", "to":"http://localhost:5984/to"} If that's also slow then we probably have a weird problem with the multipart code (fun!). If its not slow then most likely this is a bug in the HTTP worker pool implementation (also fun!).
