what does Slow Write operation on file mean?

2,618 views
Skip to first unread message

Zhihua Lai

unread,
May 11, 2016, 4:13:27 PM5/11/16
to mod-pagespeed-discuss
I have noticed that following in apache2 log, but not sure what it means and how to improve it?

[Wed May 11 20:09:03.549759 2016] [pagespeed:error] [pid 25872:tid 139812954580736] [mod_pagespeed 1.9.32.14-0 @25872] Slow write operation on file /var/cache/mod_pagespeed/v2/uploadbeta.com/https,3A/,2Fuploadbeta.com/_s/upload/2015/    12/22/cb8e5ab2dc5ce87731ca5d545e90b7e3.gif,.temp2qZcn0: 67.025ms; configure SlowFileLatencyUs to change threshold\n

thanks

Joshua Marantz

unread,
May 11, 2016, 4:19:39 PM5/11/16
to mod-pagespeed-discuss
It just means that a file-cache operation took longer than 50ms.  If that happens infrequently -- say a few times a day -- it's probably not something I'd worry about.  If it happens very frequently -- say several times a minute, it means that your disk speed might be slowing down visitors to your site.

One common problem we've seen is when file-caches are put on network file systems.  If you want to cache on the network it's much faster to use memcached rather than a file-system.  I can't tell from the message whether "/var/cache" is a local hard disk or is a network mount.

-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/96e61a85-9b7a-4a69-8767-9ea63f9e4fa1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zhihua Lai

unread,
May 11, 2016, 4:27:47 PM5/11/16
to mod-pagesp...@googlegroups.com
Thanks... /var/cache  is a local hard disk.. but my VPS is using SSD.. why it is so slow?

--
You received this message because you are subscribed to a topic in the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mod-pagespeed-discuss/znPu2AcI-xM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/CAGKR%2BEBGHr9pYwwQvF54PiQ0hsdrCTG1e7r7UNEn5SXHMnv64g%40mail.gmail.com.

Joshua Marantz

unread,
May 11, 2016, 4:37:57 PM5/11/16
to mod-pagespeed-discuss
Why?  It could be contention with other programs, or a burst of requests to your Apache server.  67ms sounds really slow for an SSD though, so I'm guessing there was CPU contention as well.

The real question is: how often do you see this message?  How many times per day?

-Josh

Steven C

unread,
Jun 26, 2017, 9:12:21 PM6/26/17
to mod-pagespeed-discuss
I see this all the time and we have a 0.1wa in top with SSDs. The files it has issues with I can access them instant when I cat them the minute the error comes up. How can this be fixed, I think its pagespeed really.

Joshua Marantz

unread,
Jun 26, 2017, 9:39:12 PM6/26/17
to mod-pagespeed-discuss
It's just reporting a slow file access.  It doesn't mean necessarily that something needs to be fixed, but it might impact end-user latency.  You can change the threshold to reduce the frequency that the message appears.

One control you might have is the number of rewrite-threads, which are the threads that generally access the cache.


If there are too many concurrent requests, that can add queuing delays.  The fact that you have an SSD and are getting this is puzzling though.   Are you certain your ModPagespeedFileCachePath points to an SSD?




--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/63f9d7c4-98c1-4504-bab2-c8f6192f8e72%40googlegroups.com.

Steven Craig

unread,
Jun 26, 2017, 9:55:00 PM6/26/17
to mod-pagesp...@googlegroups.com

Ok, Ill take a look at NumExpensiveRewriteThreads, but have any recommendation on this setting? Im using apache 2.4 event mpm in CloudLinux 64bit 7.1 and yes im 100% sure, they are local SATA SSDs. I dont see this all the time, but more then I think I should.

You received this message because you are subscribed to a topic in the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mod-pagespeed-discuss/znPu2AcI-xM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mod-pagespeed-di...@googlegroups.com.
steven.vcf

Joshua Marantz

unread,
Jun 26, 2017, 9:58:46 PM6/26/17
to mod-pagespeed-discuss
NumExpensiveRewriteThreads does not directly access the cache; that's the thread-pool used to transform content (e.g. optimize images).  The file-cache is accessed from NumRewriteThreads.  However, it occurs to me that this might not be the file-cache.  This might be LoadFromFile.  Do you have that configured?

Can you share the pattern of a filename for which you saw this report?



To unsubscribe from this group and all its topics, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/7d5743e0-9175-be7e-2063-d0b9443b70e0%40aiso.net.

Steven Craig

unread,
Jun 27, 2017, 9:14:50 AM6/27/17
to mod-pagesp...@googlegroups.com
Here is one:
[Tue Jun 27 06:12:52.280364 2017] [pagespeed:error] [pid 3080:tid 140657217693440] [mod_pagespeed 1.12.34.2-0 @3080] Slow ReadFile operation on file /var/cache/mod_pagespeed/v3/site.com/http,3A/,2Fwww.site.com/wp-content/uploads/2013/04/xCO_series.jpg.pagespeed.ic.KMuZfuznJy.jpg,: 2270.25ms; configure SlowFileLatencyUs to change threshold\n
To unsubscribe from this group and all its topics, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/CAGKR%2BECOj0y8aqV-K2LzJ1nA8VQkG456XVhaKyKpcMyyzQjiYQ%40mail.gmail.com.
steven.vcf

Joshua Marantz

unread,
Jun 27, 2017, 9:23:13 AM6/27/17
to mod-pagespeed-discuss
Confirming that's a file-cache filename pattern.  If /var/cache/mod_pagespeed is really an SSD, that's indeed surprising, but I'm not sure what I could do to diagnose.  And if it happens relatively rarely it may be fine to just let it be.

How large is that file?

To unsubscribe from this group and all its topics, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mod-pagespeed-discuss/znPu2AcI-xM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Rodrigo Gomes

unread,
Dec 22, 2017, 12:36:48 PM12/22/17
to mod-pagespeed-discuss
I also use CloudLinux and I have the same problem as you. I suspect it's the CloudLinux I/O limit.



Em segunda-feira, 26 de junho de 2017 22:55:00 UTC-3, Steven C escreveu:

Ok, Ill take a look at NumExpensiveRewriteThreads, but have any recommendation on this setting? Im using apache 2.4 event mpm in CloudLinux 64bit 7.1 and yes im 100% sure, they are local SATA SSDs. I dont see this all the time, but more then I think I should.

On 6/26/2017 6:38 PM, 'Joshua Marantz' via mod-pagespeed-discuss wrote:
It's just reporting a slow file access.  It doesn't mean necessarily that something needs to be fixed, but it might impact end-user latency.  You can change the threshold to reduce the frequency that the message appears.

One control you might have is the number of rewrite-threads, which are the threads that generally access the cache.


If there are too many concurrent requests, that can add queuing delays.  The fact that you have an SSD and are getting this is puzzling though.   Are you certain your ModPagespeedFileCachePath points to an SSD?

On Mon, Jun 26, 2017 at 9:12 PM, Steven C <steven...@gmail.com> wrote:
I see this all the time and we have a 0.1wa in top with SSDs. The files it has issues with I can access them instant when I cat them the minute the error comes up. How can this be fixed, I think its pagespeed really.

On Wednesday, May 11, 2016 at 1:13:27 PM UTC-7, Steak OverCooked wrote:
I have noticed that following in apache2 log, but not sure what it means and how to improve it?

[Wed May 11 20:09:03.549759 2016] [pagespeed:error] [pid 25872:tid 139812954580736] [mod_pagespeed 1.9.32.14-0 @25872] Slow write operation on file /var/cache/mod_pagespeed/v2/uploadbeta.com/https,3A/,2Fuploadbeta.com/_s/upload/2015/    12/22/cb8e5ab2dc5ce87731ca5d545e90b7e3.gif,.temp2qZcn0: 67.025ms; configure SlowFileLatencyUs to change threshold\n

thanks
--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mod-pagespeed-discuss/znPu2AcI-xM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Steven Craig

unread,
Dec 22, 2017, 1:24:27 PM12/22/17
to mod-pagesp...@googlegroups.com
It cant be since the I/O limits are only imposed within the cage/virtual file system of the user, and mod_pagespeed doesnt run in a cage. Although cloudlinux would have to verify this.
To unsubscribe from this group and all its topics, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/4fd3b9ad-7df8-428e-81eb-0c3a5a665db3%40googlegroups.com.
steven.vcf
Reply all
Reply to author
Forward
0 new messages