When using PXF with writable external tables to write data to Network Attached Storage (NAS) smaller jobs may complete successfully, but there is a significant decline in performance for larger tables, resulting in considerably longer processing times.
GPDB 6.27.1 writing to a NAS using PXF
The space required to copy is more than the space of the files alone. There is extra space needed for temp files during the copy. The error reported is listed below.
The log below reports that the writes were completing successfully and then it started to fail with the error. This never failed outright, it was just extremely slow.
2024-09-28 19:12:27.698 IST INFO [881322-0000000002:host01:263] 44196 --- [88-exec-15] o.g.p.s.c.BaseServiceImpl : Completed write operation [140 ms, 1 record, 7.14 records/sec, 2061 bytes, 14721.43 bytes/sec]
2024-09-28 20:08:20.868 IST ERROR [885444-0000000002:host02:260] 44196 --- [888-exec-4] o.g.p.s.b.WriteBridge : Failed to close bridge resources: Invalid argument
2024-09-28 20:08:20.868 IST ERROR [885444-0000000002:host02:262] 44196 --- [88-exec-11] o.g.p.s.b.WriteBridge : Failed to close bridge resources: Invalid argument
2024-09-28 20:08:20.869 IST INFO [885444-0000000002:host02:260] 44196 --- [888-exec-4] o.g.p.s.c.BaseServiceImpl : Failed write operation [390851 ms, 1 record, 0.00 records/sec, 343 bytes, 0.88 bytes/sec] for null
2024-09-28 20:08:20.869 IST INFO [885444-0000000002:host02:262] 44196 --- [88-exec-11] o.g.p.s.c.BaseServiceImpl : Failed write operation [390851 ms, 1 record, 0.00 records/sec, 321 bytes, 0.82 bytes/sec] for null
2024-09-28 20:08:20.869 IST ERROR [885444-0000000002:host02:262] 44196 --- [88-exec-11] o.g.p.s.c.PxfErrorReporter : Invalid argument
2024-09-28 20:08:20.869 IST INFO [885444-0000000002:host02:260] 44196 --- [888-exec-4] o.g.p.s.c.BaseServiceImpl : Failed write operation [390851 ms, 1 record, 0.00 records/sec, 343 bytes, 0.88 bytes/sec] for null
2024-09-28 20:08:20.869 IST INFO [885444-0000000002:host02:262] 44196 --- [88-exec-11] o.g.p.s.c.BaseServiceImpl : Failed write operation [390851 ms, 1 record, 0.00 records/sec, 321 bytes, 0.82 bytes/sec] for null
2024-09-28 20:08:20.869 IST ERROR [885444-0000000002:host02:262] 44196 --- [88-exec-11] o.g.p.s.c.PxfErrorReporter : Invalid argument
java.io.IOException: Invalid argument
at java.io.FileOutputStream.close0(Native Method) ~[?:1.8.0_422]
at java.io.FileOutputStream.access$000(FileOutputStream.java:53) ~[?:1.8.0_422]
at java.io.FileOutputStream$1.close(FileOutputStream.java:356) ~[?:1.8.0_422]
at java.io.FileDescriptor.closeAll(FileDescriptor.java:212) ~[?:1.8.0_422]
at java.io.FileOutputStream.close(FileOutputStream.java:354) ~[?:1.8.0_422]
at org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileOutputStream.close(RawLocalFileSystem.java:250) ~[hadoop-common-2.10.2.jar!/:?]
at java.io.FilterOutputStream.close(FilterOutputStream.java:159) ~[?:1.8.0_422]
Free up more space on the storage
or
Use a different NAS with more free space