I'm working on a Spring Boot server which handles up & downloads of large (~1GB) files by multipart via HTTP. I disabled Spring's default multipart filter (by spring.servlet.multipart.enabled=false) and use Apache FileUpload Streaming API to process the HTTP request.
When I start simultaneous uploads (from postman) or downloads (from browser) I get the max sum speed of about 40MB/s. The bottleneck looks to be the CPU, since it's ~100% utilized (all cores) at 40MB/s speed.
I tried to profile uploads by discarding the incoming HTTP multipart InputStream in the @Service behind the upload @Controller, but the 40MB/s limit didn't get faster. (I mean discarding that I read out the stream but didn't forward it into a file or anything else. So basically just skipped the stream.)
I get the above performance on an Intel i7-6700HQ processor (4 cores 8 threads ~ 3GHz).
I want to know if I messed up something OR is this the limitation of using Spring Boot? How could I improve performance? Is Spring Boot a bad choice for this task?
(Here you can see the source code, if you would take a look at it: https://github.com/janosgats/laboschqpa.filehost)