Alpha Video Training
Results 1 to 17 of 17

Thread: SSD = faster PDFs?

  1. #1
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,592

    Default SSD = faster PDFs?

    We're looking for *anything* that will speed up PDF production and delivery.

    Has anyone compared an SSD to a standard HD to see if that makes any difference?

    I'm on cloud servers, it wouldn't even be hard to add a RAM drive if there was a way to use that for the PDFs.
    -Steve


  2. #2
    Member Tim Sutherland's Avatar
    Real Name
    Tim Sutherland
    Join Date
    Jul 2000
    Location
    Michigan
    Posts
    287

    Default Re: SSD = faster PDFs?

    Steve,
    We have 4 SSD drives in our server and they make a huge difference with disk reading and writing. In our tests, if your bottleneck is in reading or writing the pdf files, you can expect the disk processing to be about 6-8 times faster with SSD drives.

    We’ve had such good success with them that we are now converting our workstations to use them as well.

    Hope this helps...

  3. #3
    Member
    Real Name
    Nate Battles
    Join Date
    Dec 2015
    Posts
    20

    Default Re: SSD = faster PDFs?

    If you any questions about I/O - SSDs will essentially eliminate that variable - it does sort of depend on the kind of SSDs - those vary too, but most enterprise level SSDs will be fantastic. We are working towards moving to almost all SSDs for our clients. In the US this has started already. We see absolutely no bottlenecks on the disk side with SSD.

    Next phase - it's NVMe, we are building some new gear where the caching and tier 1 storage will be on NVMe, then SSD for tier 2-3, followed by tier 4-5 HDDs for slower, read/write/snapshot repos.

    There's definitely no concern with I/O with NVMe, but rather can your network infrastructure actually handle that amount of throughput! It's like going from a 24 lane Autobahn to a 2 lane highway :)

  4. #4
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,594

    Default Re: SSD = faster PDFs?

    Steve, have you done any time studies to see where the bottlenecks are?

    At ENEFEN we did a project to speed up printing of pdfs and ended up doing a bunch of things, but the three that helped the most were:

    If you are pulling data from several different tables like we were, it helped a lot to use a stored procedure to build a single temporary memory engine table, sorted in print order, that was then used to print the report. Transfer that table to the server that contains the alpha print engine.

    Our pdf's were a combination of individual pdf's that were appended together. For that, Jerry B. suggested pdf_append_list() that loads them into memory and does the append there. Much faster and more trouble free than pdf_append()

    Our reports contained a lot of boiler plate, pictures and drawings, so we made a lot of use of printHTML() to print areas that were already formatted as variables in memory with alpha.

    I would expect the SSD's to help but, like Nate, I'd worry about the network speed throttling that speed back.
    Pat Bremkamp
    MindKicks Consulting

  5. #5
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,592

    Default Re: SSD = faster PDFs?

    Thanks gents.

    Looking at doing this on one server tomorrow. I wonder:

    Right now I simply have a C:\ drive with everything on it.

    So, I add an SSD as the D:\ drive and move the webroot to that.

    But, is that sufficient? Does any / a lot of the work rendering the PDFs get done on the C drive still? How to insure the PDF work gets done on the SSD?

    For obvious reasons I really don't want to go through a whole new construction of a new SSD boot drive.
    -Steve


  6. #6
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,746

    Default Re: SSD = faster PDFs?

    I use Alpha's runtime to generate PDF docs for patient medical records that can be, at times, hundreds of pages in length. Because of the potential for these PDFs to be quite large the user returns to the app sometime later to download it. How are you handling your PDF creation and delivery?

    When my process runs a ton of temp files are created in C:\Users\Administrator\AppData\Local\Temp\AlphaAnywhere\p_4892. Something else to consider: Does a SSD even matter when these PDF's are being built? Wouldn't that be a function of processor and memory speed?
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  7. #7
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,592

    Default Re: SSD = faster PDFs?

    I'm not sure where the PDF production bottleneck is, sure wish I knew.

    Looks to me that the process to switch to an SSD on the cloud is this:

    1. Create an image of the existing standard drive
    2. Create a new SSD drive using that image
    3. Detach existing drive, attach the new SSD drive.

    I have 1 & 2 done already but need to wait until later tomorrow for Step3.

    I think this solves my question of how to be sure the PDF work is done on the SSD.

    SSD drives perform better with more CPUs. Google Cloud's examples often use 8 or 32 CPUs. We're running 4 on the server, and I don't want an email from Alpha telling me I've broken my license agreement by adding more CPUs.

    As for later delivery, yes, we have some of that in place but need to formalize, centralize and build that out, and figure out how we can "know" that some reports can be delivered immediately to the browser, and others stored for download later on. Variables include user-selected date ranges. One report spanning one day is going to be just fine for immediate delivery. But if the user selects 10 days, maybe store for later. And date range is just one of several variables.

    So, we're throwing more/better hardware at this to begin with. Not a total solution, but hopefully a part of a solution. And it may make more reports available immediately to the user rather than stored for later download.
    -Steve


  8. #8
    Member
    Real Name
    Richard Battle
    Join Date
    May 2017
    Location
    Austin,TX
    Posts
    88

    Default Re: SSD = faster PDFs?

    Yes I switched to SSD basically for that reason alone. Makes it almost instant.

  9. #9
    VAR
    Real Name
    Mike Reed
    Join Date
    Apr 2000
    Location
    Phoenix, AZ
    Posts
    649

    Default Re: SSD = faster PDFs?

    Quote Originally Posted by Pat Bremkamp View Post
    Steve, have you done any time studies to see where the bottlenecks are?

    At ENEFEN we did a project to speed up printing of pdfs and ended up doing a bunch of things, but the three that helped the most were:

    If you are pulling data from several different tables like we were, it helped a lot to use a stored procedure to build a single temporary memory engine table, sorted in print order, that was then used to print the report. Transfer that table to the server that contains the alpha print engine.

    Our pdf's were a combination of individual pdf's that were appended together. For that, Jerry B. suggested pdf_append_list() that loads them into memory and does the append there. Much faster and more trouble free than pdf_append()

    Our reports contained a lot of boiler plate, pictures and drawings, so we made a lot of use of printHTML() to print areas that were already formatted as variables in memory with alpha.

    I would expect the SSD's to help but, like Nate, I'd worry about the network speed throttling that speed back.

    Thanks for the info Pat. I'm wondering if you could give some more details on the stored procedure process you mentioned. How does one go about doing a report with a stored procedure?

    Thanks,
    Mike Reed
    Phoenix, AZ

  10. #10
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,592

    Default Re: SSD = faster PDFs?

    Well, we don't have extensive testing. One comparison is all in fact.

    I have two web servers, about identical so now one has the new SSD and the other a standard HD. I used localhost to compare the creation/delivery of a 200 page PDF so that load balancers, etc. are not part of the equation.

    There was no difference in delivery times. Not even one second difference.

    Pat's right that stored procedures and everything else you can do to take the processing off of Alpha is very helpful. Right now I'm not sure switching to SSD does a whole lot for PDF delivery though.
    -Steve


  11. #11
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,594

    Default Re: SSD = faster PDFs?

    Our challenge was to create a 20 to 30 page report that was made up from 8 to 10 individual pdfs. Some of the pdf's included 30 to 50 images and some were B sized drawings built on the fly and we needed a table of contents.
    We are using MariaDB and that includes a memory engine that builds a table in memory rather than on the hard drive. Memory engines are emptied whenever the server is restarted, but in this case the data is only needed until the report finishes, so that is not a problem. So, we stratified speed from fastest to slowest and got
    memory
    reading an individual table (only one start and stop, the slowest part of table operations). This is also faster if that table is dedicated to the print operation so it is not subject to locks from other users.
    stored procedures in the database engine when there are multiple tables to read and write. The database engine is multi-threaded. For example, we reduced the time to create a table from 5 seconds to 1/2 second.
    Xbasic loaded into memory in an aex or Xbasic module using require()
    Xbasic reading and writing to a table
    internal network
    print engine
    internet

    So, the idea is to push as much processing as possible up this list. We created a single memory table, sorted in order and used a stored procedure to populate the table from the multiple source tables. We compressed the images and stored them on the same server as Alpha prior to printing. We used an Xbasic module where possible for the processing.

    When we started, we were using alerts to the user so they would know the program was not locked up. When we finished, the alerts were not needed because the whole process was only a couple seconds.
    Pat Bremkamp
    MindKicks Consulting

  12. #12
    "Certified" Alphaholic chadbrown's Avatar
    Real Name
    Chad Brown
    Join Date
    Aug 2007
    Location
    Aurora, Ontario, Canada
    Posts
    1,408

    Default Re: SSD = faster PDFs?

    Hey Steve, do the reports need to be live data or is a snapshot from a few hours ago good enough?
    Chad Brown

  13. #13
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,592

    Default Re: SSD = faster PDFs?

    They vary Chad. I'm assembling one central/monster reporting center. Couldn't tell you the eventual number of reports - well over 200 I think so lots of differing needs.
    -Steve


  14. #14
    "Certified" Alphaholic chadbrown's Avatar
    Real Name
    Chad Brown
    Join Date
    Aug 2007
    Location
    Aurora, Ontario, Canada
    Posts
    1,408

    Default Re: SSD = faster PDFs?

    Steve I have a few reports that are based off of previous days sales and can go back as far as a few years.
    The sql views that they worked of were massive and took a few minutes to build the pdf files.
    I now run a scheduled task in Navicat to export the view to excel file then import it back in as a flat new table.
    That report use to take up to 7 minutes to produce is less than 7 seconds now.
    Just a thought for items that dont need to be live.
    Its sort of what Pat does with temporary tables.
    As a side note if you can get a server to run off of the new m.2 drives it will be even faster.
    They are up to 10x faster than SSD.
    Chad Brown

  15. #15
    Member
    Real Name
    jim wilson
    Join Date
    May 2019
    Posts
    21

    Default Re: SSD = faster PDFs?

    based on your posts from march 7, did you improve performance?

  16. #16
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,592

    Default Re: SSD = faster PDFs?

    No, that project hasn't gotten any further. so I have no additional wisdom.
    -Steve


  17. #17
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,257

    Default Re: SSD = faster PDFs?

    Quote Originally Posted by Pat Bremkamp View Post
    Steve, have you done any time studies to see where the bottlenecks are?

    At ENEFEN we did a project to speed up printing of pdfs and ended up doing a bunch of things, but the three that helped the most were:

    If you are pulling data from several different tables like we were, it helped a lot to use a stored procedure to build a single temporary memory engine table, sorted in print order, that was then used to print the report. Transfer that table to the server that contains the alpha print engine.

    Our pdf's were a combination of individual pdf's that were appended together. For that, Jerry B. suggested pdf_append_list() that loads them into memory and does the append there. Much faster and more trouble free than pdf_append()

    Our reports contained a lot of boiler plate, pictures and drawings, so we made a lot of use of printHTML() to print areas that were already formatted as variables in memory with alpha.

    I would expect the SSD's to help but, like Nate, I'd worry about the network speed throttling that speed back.
    Pat,

    This post did marvels for my payroll project.
    I reworked the code, including dumping the results of the primary query into one table.
    The job that used to take over 30 minutes is now down to 78 seconds.

    Gregg

Similar Threads

  1. How to show pdfs
    By madtowng in forum Alpha Five Version 10 - Desktop Applications
    Replies: 9
    Last Post: 04-11-2014, 05:30 PM
  2. Filtered PDFs using a Grid
    By Zradene in forum Application Server Version 10 - Web/Browser Applications
    Replies: 22
    Last Post: 05-22-2012, 03:43 PM
  3. PDFs and Database Files
    By jrturner0112 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 03-14-2012, 02:50 PM
  4. Printing linked pdfs
    By danb708 in forum Alpha Five Version 10 - Desktop Applications
    Replies: 2
    Last Post: 02-16-2011, 12:30 PM
  5. Printing PDFs (landscape)
    By Vince McGinnis in forum Alpha Five Version 5
    Replies: 2
    Last Post: 05-27-2003, 08:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •