Help to fix: WARNING: Readahead for /data!

2,066 views
Skip to first unread message

retf

unread,
May 18, 2013, 12:40:45 PM5/18/13
to mongod...@googlegroups.com
Hi all, 


The problem is when I start my mongo I get this: 


Server has startup warnings:
Sat May 18 16:32:48.963 [initandlisten]
Sat May 18 16:32:48.963 [initandlisten] ** WARNING: Readahead for /mdbd is set to 1024KB
Sat May 18 16:32:48.963 [initandlisten] **          We suggest setting it to 256KB (512 sectors) or less
Sat May 18 16:32:48.963 [initandlisten] **          http://dochub.mongodb.org/core/readahead

BUT, I use  256KB, see: (like suggested)

ubuntu@ip-10-0-2-66:~$ sudo blockdev --report
RO    RA   SSZ   BSZ   StartSec            Size   Device
rw   256   512  4096          0      8589934592   /dev/xvda1
rw   256   512  4096          0    107374182400   /dev/xvdf
rw   256   512  4096          0    107374182400   /dev/xvdg
rw   256   512  4096          0    107374182400   /dev/xvdh
rw   256   512  4096          0    107374182400   /dev/xvdi
rw  2048   512  4096          0    214613622784   /dev/md127
rw  2048   512  4096          0    182414475264   /dev/dm-0
rw  2048   512  4096          0     10729029632   /dev/dm-1
rw  2048   512  4096          0     21458059264   /dev/dm-2

How to fix? What is wrong here!

Thanks

retf

unread,
May 18, 2013, 1:11:21 PM5/18/13
to mongod...@googlegroups.com
I had to do this:

more /etc/mdadm.conf

echo 'blockdev --setra 256 /dev/xvdi' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/xvdh' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/xvdg' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/xvdf' | sudo tee -a /etc/rc.local

echo 'blockdev --setra 256 /dev/md127' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/dm-0' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/dm-1' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/dm-2' | sudo tee -a /etc/rc.local

and edit 'sudo vi /etc/rc.local' to put 'exit 0' at end of file
                               
sudo blockdev --report


retf

unread,
May 18, 2013, 2:07:12 PM5/18/13
to mongod...@googlegroups.com
BUT DON'T WORK! PLEASE ANYONE HELPME!

SEE:

sudo blockdev --report

ubuntu@ip-10-0-2-66:~$ sudo blockdev --report
RO    RA   SSZ   BSZ   StartSec            Size   Device
rw   256   512  4096          0      8589934592
   /dev/xvda1
rw   256   512  4096          0    107374182400   /dev/xvdi
rw   256   512  4096          0    107374182400   /dev/xvdh
rw   256   512  4096          0    107374182400   /dev/xvdg
rw   256   512  4096          0    107374182400   /dev/xvdf
rw   256   512  4096          0    214613622784   /dev/md127
rw   256   512  4096          0    182414475264   /dev/dm-0
rw   256   512  4096          0     10729029632   /dev/dm-1
rw   256   512  4096          0     21458059264   /dev/dm-2

ubuntu@ip-10-0-2-66:~$ lsblk

NAME                   MAJ:MIN RM   SIZE RO TYPE   MOUNTPOINT
xvda1                  202:1    0     8G  0 disk   /
xvdi                   202:128  0   100G  0 disk
└─md127                  9:127  0 199.9G  0 raid10
  ├─vg0-data (dm-0)    252:0    0 169.9G  0 lvm    /mdbd
  ├─vg0-log (dm-1)     252:1    0    10G  0 lvm    /mdbl
  └─vg0-journal (dm-2) 252:2    0    20G  0 lvm    /mdbj
xvdh                   202:112  0   100G  0 disk
└─md127                  9:127  0 199.9G  0 raid10
  ├─vg0-data (dm-0)    252:0    0 169.9G  0 lvm    /mdbd
  ├─vg0-log (dm-1)     252:1    0    10G  0 lvm    /mdbl
  └─vg0-journal (dm-2) 252:2    0    20G  0 lvm    /mdbj
xvdg                   202:96   0   100G  0 disk
└─md127                  9:127  0 199.9G  0 raid10
  ├─vg0-data (dm-0)    252:0    0 169.9G  0 lvm    /mdbd
  ├─vg0-log (dm-1)     252:1    0    10G  0 lvm    /mdbl
  └─vg0-journal (dm-2) 252:2    0    20G  0 lvm    /mdbj
xvdf                   202:80   0   100G  0 disk
└─md127                  9:127  0 199.9G  0 raid10
  ├─vg0-data (dm-0)    252:0    0 169.9G  0 lvm    /mdbd
  ├─vg0-log (dm-1)     252:1    0    10G  0 lvm    /mdbl
  └─vg0-journal (dm-2) 252:2    0    20G  0 lvm    /mdbj
ubuntu@ip-10-0-2-66:~$


Em sábado, 18 de maio de 2013 14h11min21s UTC-3, retf escreveu:
I had to do this:

more /etc/mdadm.conf

echo 'blockdev --setra 256 /dev/xvdi' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/xvdh' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/xvdg' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/xvdf' | sudo tee -a /etc/rc.local

echo 'blockdev --setra 256 /dev/md127' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/dm-0' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/dm-1' | sudo tee -a /etc/rc.local
echo 'blockdev --setra 256 /dev/dm-2' | sudo tee -a /etc/rc.local

and edit 'sudo vi /etc/rc.local' to put 'exit 0' at end of file
                               
sudo blockdev --report

When I restart NODE, sometimes I get:

MongoDB shell version: 2.4.3
connecting to: test
Server has startup warnings:
Sat May 18 18:03:40.708 [initandlisten]
Sat May 18 18:03:40.708 [initandlisten] ** WARNING: Readahead for /mdbd is set t
o 1024KB
Sat May 18 18:03:40.708 [initandlisten] **          We suggest setting it to 256
KB (512 sectors) or less
Sat May 18 18:03:40.708 [initandlisten] **          http://dochub.mongodb.org/co
re/readahead
>

AND sometimes I get (correct result)

MongoDB shell version: 2.4.3
connecting to: test
>

WELL, I don't know how to fix it once for all!

Jordan Morris

unread,
Jun 1, 2013, 12:29:46 AM6/1/13
to mongod...@googlegroups.com
To put this simpler:

sudo nano /etc/rc.local

And add to the end of the file:

blockdev --setra 32 /dev/xvda1
blockdev --setra 32 /dev/xvdh2
blockdev --setra 32 /dev/xvdh1
blockdev --setra 32 /dev/xvdh3
blockdev --setra 32 /dev/xvdh4
blockdev --setra 32 /dev/xvda3
blockdev --setra 32 /dev/md127
blockdev --setra 32 /dev/dm-0
blockdev --setra 32 /dev/dm-1
blockdev --setra 32 /dev/dm-2
exit 0


(Of course you should replace the drive volume paths with the paths in your configuration. They can be viewed with
sudo blockdev --review
)

If blockdev review tells you after restart that the readaheads are correct, but you still get the warning, it is probably because mongod started up before these rc.local finished running. If you restart mongod
sudo service mongod restart
You will probably see the warning no longer appears (until perhaps you next restart).
However (and perhaps someone from mongo can correct me on this) the warning should be able to be safely ignored, because mongod probably decided you need the warning when it initialised. By the time the server is finished booting however, the blockdev settings are what they are.


Renato Forti

unread,
Jun 1, 2013, 11:50:40 AM6/1/13
to mongod...@googlegroups.com
Thanks!


2013/6/1 Jordan Morris <morr...@gmail.com>



--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
 
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/0TSzdru_x0M/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Asya Kamsky

unread,
Jun 1, 2013, 1:33:45 PM6/1/13
to mongod...@googlegroups.com

The warning will be "in effect" until you restart mongod - in fact new readahead settings won't help until mongod is restarted.
Starting mongo shell only displays warnings that were "collected" when mongod process started.

Asya
Reply all
Reply to author
Forward
0 new messages