Showing posts with label Transfer Tests. Show all posts
Showing posts with label Transfer Tests. Show all posts

Friday, May 14, 2010

The return of LHCb at Glasgow

After weeks of investigating and debugging our LHCb transfer issue at Glasgow we have finally fixed it. So ..... spill the beans I hear you cry.

Well in short, we had an iptables rule on the INPUT filter of the NAT that was dropping strangely behaving gridftp connections. This was relaxed and allowed inbound connections to be established. This has solved the issue and we still have the protection of the campus firewall for security.

Strangely behaving gridftp connections, what does that mean? Well, transfers that had failed to work first time seemed to get into an unknown state and transfer no bytes, with many RETRY packets and no FIN packet. It appears that these connections were trying to establish inbound connections. These were then dropped by a REJECT within our iptables.

Moral of the story is, if you can get external IP's for your worker nodes, use them. NAT'ing just adds complexity especially when dealing with GLOBUS.

The full story if you are interested ....

Problem: LHCb don't use FTS. They use direct outbound gridftp transfers of job outputs. Jobs on WN's transfer results, using the lcg-utils tools, at the end of the job to CERN and failover to various T1's if there is an issue with the CERN transfer. LHCb have seen a large failure rate with around 50% of gridftp/lcg-cp transfers failing at Glasgow. Brunel, Sheffield and Lancaster have been affected with the same issue although to a lesser extent. Failure rates at the other sites are much less at around 2-3%. We see the initial transfer timing out, failing over to a T1, this sometimes works and sometimes fails over to another T1 and so on. Why has this not been seen sooner? Well this has actually been there since day dot but DIRAC masked the return code of the failure. A new version of DIRAC catches the fail-overs and are killed by their watchdog. Thus bringing this issue to the surface.

Investigation: Glasgow looks like this WN's-> NAT->CAMPUS FIREWALL->WORLD. We managed to recreate the issue with a simple transfer test from varying amounts of WN's to test SRM end-points. This recreated the issue and we saw a 50% failure rate across various SRM implementations, in particular CASTOR, DCACHE, STORM. However, DPM transfers were 100% successful. Failed transfers manifested themselves are lcg-cp: timed out or lcg-cp: error on send. We repeated these tests using various VO's and got similar results so we did not think it was VO related. We monitored the connections though our NAT and asked the firewall team to check if any outbound ports were blocked, they were not. The GLOBUS_TCP_PORT_RANGE at Glasgow was set to a specific known open port range for inbound connections but this does not matter in this case of outbound connections. To be on the safe side we set GLOBUS_TCP_SOURCE_RANGE for outbound connections through our NAT. As we expected this did not make a difference. After discussion with other sites we checked client libraries, OS and network. One thing that did crop up was the use of NAT.

The final test was 100 simultaneous transfers from one node via the NAT. We saw a 50% failure rate. We repeated this test but this time with an external address and no NAT routing. This was 100% successful over 3 attempts. Quickly repeated tests did show some failures but this was probably the firewall dropping connections. Therefore, we were able to clearly identify the NAT as being the issue. We tried tweaking TCP settings on the NAT i.e. tcp_fin_timeout, tcp_tw_reuse, tcp_tw_recycle, tcp_keepalive_time with no success. The iptables rules themselves seemed sensible but we were still dropping 50% of the connections.

We then moved to tcpdumping the tcp packets (SYN and FIN) from the internal (eth0) device and compared it to a tcpdump of the external (eth1) device. You could clearly see the control channels opening, data channels opening, transfers and then around 50% of the transfers sending retry packets and never sending a FIN. It looked like something was being blocked.

A closer look at the iptables rules identified an entry on the INPUT filter that could be the culprit. Further up the chain we were allowing RELATED,ESTABLISHED as you would expect. Then we had a -A INPUT -i eth1 -p tcp -m tcp -j REJECT --reject-with tcp-reset. It appears this entry caused attempts to re-establish the connection to fail (possibly by blocking the initial packet from the destination, erroneously considering it not to count as ESTABLISHED any more). Very strange behaviour indeed. In the plus side we generally use the campus firewall to protect us from unwanted traffic rather than our own iptables rules, so we have relaxed the INPUT filter and guess what, near 100% transfer success.

Wednesday, March 26, 2008

Edinburgh as an LHCb Tier-1?


I've just been accused (jokingly, I hope) of trying to turn Edinburgh into LHCb's 7th Tier-1. The attached plot shows the recent data transfers that I have been running into our dCache. The rates are good (~35MB/s), but not particularly special. However, against a background of zero, it certainly made LHCb jump up and take notice ;) Maybe this will convince them that Tier-2s really can be used for analysis jobs...

I should note that during these transfers one of the dCache pools was about to melt (see below). I've since reduced the max number of movers on each pool to something more reasonable. For the tests, I created a small application that spawned ~50 simultaneously lcg-cp's that were all transferring files from CERN CASTOR to Edinburgh. Who needs FTS when you've got DIRAC and lcg_utils? Now all I need is someone else's proxy and I'll never be caught... ;) But, on a serious note, I suppose this does show that people can create tools to abuse the system and get round the official FTS channels, which could impact the service for other users.

Sunday, June 03, 2007

Transfer Tests

Continuing with transfer tests between RAL-T2 and Glasgow over the weekend to investigate the effect of the Streams setting within glite-transfer-channel-set. Turns out it's not a very clear effect - negligible at best. As Greig has already noted that -T 1 is best for dcache, I propose we leave them at that.

However, totalling up the traffic for the weekend, I've moved 6.3 TB since friday afternoon (41h) which gives us a sustained average bandwith of 343Mb/s

But... Thats only 6.3 out of a requested 7.5. Only 7/15 transfers completed sucessfully with all 500 files being transferred. The others copped out with:

(mostly) FTS Reason: Failed on SRM get: Failed To Get SURL. Error in srm__get: service timeout.
(some) FTS Reason: Failed on SRM get: SRM getRequestStatus timed out on get
(twice) FTS Reason: Failed on SRM put: Failed SRM put on httpg://svr018.gla.scotgrid.ac.uk:8443/srm/managerv1 ; id=... call. Error is File exists


So, considering I was transferring the same 50 seed files, thats quite alot of crapness on behalf of the dCache source. Not sure what caused the two false "file exists" failures. I severely doubt that more than 10% failure rate is acceptable to the experiments.

I'll present the full findings (once I've plotted them) at the GDB Meeting on Tuesday

Worth noting that Pauls MonAMI data was v useful in keeping an eye on the dteam specific data pool usage, together with the health of the DPM service at Glasgow.

Tuesday, May 29, 2007

Transfer Channels

Back to 'proper' work, and I realised that the transfer-channel sizes are still very conservative (with the exception of Imperial). Rather than just increasing to a high value, I thought I'd plot some timings to show the difference of a 0.5TB FTS session.

The 4 steps on the image show: seeding to ral-T2 with lcg-cr from local workstation, then 3 sets of transfers up to uki-scotgrid-glasgow with the files setting on the transfer channel to 5,10 and 15 respectively.

My script *should* have continued with larger steps, but some of us forgot to renew the voms-proxy...

Tuesday, April 24, 2007

iperf redux



Last Month Greig and I performed a quick round of iperf benchmarks between Glasgow and Edinburgh (see plot) and got around 520/570 Mb/s. However due to some network tweakage, we've just rerun the plot and got the cracking results below:
24 Apr plot

Friday, March 09, 2007

Network Asymmetry

Any transfer tests including Glasgow show up assymmetry in the network. We can take data in twice as fast as we can spit it out. Note to self: Follow up with Compserv networks.

Friday, January 12, 2007

End of the week - more Transfers tests (and a quick Perl script to summarise logs). Colin's tweaks have vastly improved inbound speeds to UKI-SCOTGRID-GLASGOW from Edinburgh to over 600Mb/s. "Nice!"

Having problems transferring to/from RAL-T1 though. Suspect it's more likely to be typos in SRM URL's rather than system failures. Symptoms are

Reason: Failed on SRM put: Cannot Contact SRM Service. Error in srm__ping: SOAP-ENV:Client - CGSI-gSOAP: Error reading token data: Success; also failing to do 'advisoryDelete' on target.

Plan for next week - More of the same - check that size isn't an issue (hope not!)