It was a dark and stormy night when the phone rang.
Ok, maybe not, but Melbourne, Australia isn’t known for its great weather!
The phone did ring and I did pick it up. It was Frank* from one of our educational customers who was looking for support. He was able to quickly summarise that the issue was “The print popup is very slow to show on one teacher’s laptop.”
My first thought is that slowness is a subjective thing and there are many places in the print process that can contribute to things being slow.
The process includes, but is not limited to:
- The user selects File -> Print or presses Ctrl+P In some environments, the status of the printer can impact on how quickly the dialogue box shows. If it’s offline, that may cause issues. If there is a corrupted driver, that might slow things. If the print server is under load, that might slow things down.
- The user then selects their printer Again, this can be slow depending on the printer status, server status, latency etc.
- **Assuming that there are no further changes, the user clicks Print or OK**
- The program then does its own work to render the print job into something the printer can understand This can include rendering complex documents with many layers into a simple graphic for the printer. Imagine a PDF with 700 layers on a single page, that needs to be down-converts into something simple. This process is reliant on the speed of the users machine. Laptops might have power saving features on. Maybe the machine is low on free memory?
- Once the job is sent off to the local print spooler… The print job may need to be re-rendered again into a print language that is understood by the printer. In some situations this is done on the users workstation, it might be done on the server. This can often be an intensive process.
- The user’s machine then transmits the job to either the printer or the print server The speed at which this happens is generally limited to the network speed. Is the user connected wirelessly? How congested is the wireless access point?What about the LAN, is it 100mbit, 1gbit, 10gbit? Are we transmitting over a VPN? A Wide-Area-Network?How big is the spool file? The same 10 page print job with one driver might be 200KB, another driver might generate a 10MB spool file.How fast are the hard drives involved? 5400 rpm hard drive in a laptop?
- The server then handles the spool file and makes any final changes This may include re-rendering it into the print language the printer understands
- The spool file is then sent off to the printer The same limitations from step 6 apply here, including the speed of the network card on the printer as well as it’s hard drive.
- With the spool file now on the printer, the printer turns it into dots on a page Again, this may require re-rendering into something that the printer can use to put dots on a page, CPU and hard drive speed play a role here.
- At this point, even if only 1 or two pages have rendered, the printer will be getting itself mechanically ready to print. If the printer was sleeping, this includes warming up the fuser Some printers will do various checks to ensure that the paper path is clear, output bins are ready
- Depending on how quick the printer is, the first page out of the printer might be a few seconds or might be longer. If the printer doesn’t have much memory, the rendering from spool file into dots-on-page might be a slow process as it has to swap out to disk or even wait for the first page to complete before it starts rendering the second
- At this point the printer will be working its quickest to get the print job done Print job complexity here will play a role again. Is it duplex? Is it colour? Is it high quality? What about draft quality? Do you need to staple, hole punch, booklet mode? All of these features will have an impact on the advertised speed of the printer.
- If there is a second print job to be done, the print server may be sending that to the printer at this point, however the printer needs to have sufficient resources to deal with it at that time. It might be low on memory, hard drive space etc.
Then you can add PaperCut into the mix. We have a very simple approach to this process in that the PaperCut Print Provider interfaces with the Windows Print Spooler (or CUPS and iPrint) and we use the Print Spoolers APIs to manage the jobs.
We will monitor the system for any new print jobs and as soon as we know about them we take action. This action will often happen well before the print job has finished transmitting to the print server. This allows us to present a user with the Account Selection Popup as soon as possible, usually within a second or two of the user printing. Once the print job has finished spooling, we’ll update the popup with new details .
Frank’s situation was that the user was reporting that the popup was showing up quickly but the complete job details wasn’t filling out quickly. I asked him to compare the description of what he was seeing with one of our KB articles. It matched.
I asked Frank if he had the teacher’s laptop and if we could try reproducing it. He did and was happy to work through this over the phone.
Frank knew the document that was a problem, knew the printer queue on the server that was being printed to and knew where that printer was.
We proceeded to open the same document and print it to the same queue.
Frank coughed. “That.. that was fine, that was really quick.”
Could it be something that was cached? A reboot and test again resulted in the same quick process.
Maybe it was the wireless? Frank unplugged the laptop from the ethernet and the results didn’t change.
At this point Frank was happy to go back to the teacher and get them to reproduce it in front of him.
I was happy to go make a coffee before my next ticket!
About an hour later I get a message from one of my team. Frank was on the phone and he needed my help again. He could reproduce it now. The call was transferred to me.
“Hi Frank, it’s Jason again, where are you at?”
“Well. I’m sitting at the teacher’s desk, plugged into the ethernet cable we give them and well, it’s slowed down!”
“Ok, this is strange.” I say. “I think this is a bandwidth issue between the laptop and the print server. Are you familiar with ‘iperf’?”
“To be honest Jason” says Frank “No I’m not.”
“Not a problem, it’s a fairly simple bandwidth measurement tool. It should show us how fast the network is between the laptop and the server.”
We won’t bore you with downloading the Windows version of iperf tool in this blog but we quickly found that the bandwidth between the laptop and the print server was measured in kilobits per second. As in 250kbit/s.
“That’s not right!”
Frank sent me a copy/paste of the output:
C:\Temp\>iperf -c print-01 ------------------------------------------------------------ Client connecting to print-01, TCP port 5001 TCP window size: 63.0 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.100.66 port 56217 connected with 192.168.2.10 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 306 KBytes 257 Kbits/sec
“Frank, that sounds like a really bad WiFi signal.”
“It does, but I’m plugged in.. Wait.. The IP address there is a Wireless address! Let me check something.”
A couple of moments later Frank comes back to me. “Ahh! It is using Wireless! The Adapter Connection order had the Wireless first. So Windows was preferencing that. I changed it and now I get great speeds.”
Frank sent me another copy/paste.
C:\Temp\>iperf -c print-01 ------------------------------------------------------------ Client connecting to print-01, TCP port 5001 TCP window size: 63.0 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.3.145 port 56217 connected with 192.168.2.10 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 840 MBytes 704 Mbits/sec
I said to Frank “Hey, that’s awesome. I assume the printing is much better?”
“Let me check…” A couple of clicks later and it was confirmed. The details are shown in the popup nice and quickly.
“Jason, thanks very much for that. We’ve got that sorted out!”
“Hang on, one last thing, 250Kbit really isn’t great. Is that to be expected?”
“No, mine’s fine here.” Frank states matter-of-factly. “Yours is fine?” I ask.
“Yeah, my laptop is on the teacher’s desk, I just ran iperf and the wireless is running acceptably at 26Mbit.”
“Humour me on this. Can you move the teachers laptop to the other side of the desk?”
“Uh, sure. HEY! That’s worked! How did you know?”
“My background is in education, I’ve worked in schools as a Systems Administrator for several years. Wireless is a great technology, but sometimes it has issues. Something as simple as location in a room can cause interference or just plain old dead spots. I’ve dealt with this one before.”
“That explains a few things! Thanks for your help. I’ll let you go.”
“Not a problem. I have a coffee calling my name.”
Long story short, PaperCut believes that our support team needs to be able to assist not only with the PaperCut product but the environment that it’s in. Our support team has the real world experience to make printing less of the migraine-inducing pain point that we all know it can be.