简体   繁体   中英

RoR: > 90% I/O when writing temp file

I have a RoR app that takes in a data stream, saves it as a PDF (up to 25 mb) by writing it temporarily to the server hard drive, once the file has been successfully created it then uploads it to hosted storage. Once the file is uploaded, it is deleted from it's temp location on the server hard drive.

The problem I'm running into is that according to New Relic this process is spiking my I/O to over 90%, causing performance issues in my app.

Is there a recommended way in which to rearchitect my application so that I don't see these issues? Should I be writing my temp files elsewhere?

90% I/O of server or application?

You can write it to ramdisk, if you have enough memory. (just google how to make it for your linux distribution)

But actually rails application runs in a memory, so it don't need to user hard disk.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM