Tuesday, August 13, 2013

Example of how to set JournalCommitInterval in MongoDB

I have found no way yet to find the current value of journalCommitInterval.

But, I have found how to set the journalCommitInterval.

We've got our mongodb set up to use a local disk for our journal, and data resides on a SAN-mounted mount point.

We'd like to set our journalCommitInterval up to a larger value to cut down on the IOPS to our local disk. This might have the added benefit of helping us run faster.

I've run the following command against a mongos, and it complains:

mongos> db.adminCommand({ "setParameter" : 1, "journalCommitInterval": 499});
{ "ok" : 0, "errmsg" : "journaling is off" }
When I run this against a specific daemon, it works up to a value of 499 (setting it to 500 generates a complaint/error):
shard-000:PRIMARY> db.adminCommand({ "setParameter" : 1, "journalCommitInterval": 499});
{ "ok" : 1 }
I have posed the follwoing questions to 10Gen:
  • Question 1: do I need to run this against each mongod individually?
  • Answer 1: Yes.
  • Question 2: does this persist across restarts of the daemon?
  • Answer 2: No. That daemon's journalCommitInterval returns to its default when a daemon are restarted. Thus, it's better to set it in the config file you have defined for the shard. Or, if you define it via command line, do something like:
    /path/to/mongod --journalCommitInterval=499 ...
    
I have just created a minor request in core-server to expose the current value so we can verify it has been set correctly on all shards. If you agree this would be a handy feature to have, please watch and VOTE on the case, https://jira.mongodb.org/browse/SERVER-10508

Thursday, August 08, 2013

Solved: Installing Linux on Acer Aspire V5-122P-0643 Quadcore AMD laptop

So, my wife wanted an Acer Aspire laptop because of its size, primarily. The form factor was just right for her. But, it came with Windows 8, which she really hates (she loves Ubuntu Linux and Libre Office Writer). So, I downloaded Ubuntu Linux 13.04 Raring Ringtail and installed it on this Aspire V5 122P 0643 box. Complications?

1. windows 8 doesn't like to give up control of the BIOS. Going to system settings and boot from USB key (which I'd already put Ubuntu's install image on via another box).

2. Once installed, it wanted to reboot. I did so.

3. VAST multi-day hassles due to black screen after boot, then prompting for user login: instead of going to the graphical user login page familiar to all Ubuntu users. I messed around for a long time trying various things. Running startx failed with a message about no screens. Trying to reboot with some setting for recovery mode got me success once, but I couldn't reproduce it.

The command to show all hw installed revealed the video chipset is AMD Radeon 8280. This appears to be the only laptop, or in fact any device whatsoever, that uses this chipset, though Ubuntu seems to think it's on some desktops somewhere (in their compatibility pages).

4. FINALLY, solved the problem. On my other laptop, navigated to find the download for AMD's proprietary driver, and found the download destination.

Logged into Ubuntu using the user created during installation. Did 'sudo ls' and reentered my password so I had sudo privs without prompting. Then, downloaded the AMD driver from the link on this page: http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx

the download link was http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-13-4-linux-x86.x86_64.zip, so I retyped it at the command prompt as:

$ wget http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-13-4-linux-x86.x86_64.zip

and it downloaded. I

then did: unzip amd* and then did: chmod 755 amd* then agreed to everything and installed it, rebooted per instructions, and voila! IT WORKED!

So, the answer is that the fglrx drivers (automatically installed as part of the amd drivers download, methinks) are the correct solution here.

The touch screen does work , but is of limited usefulness since the icons are so small in a normal linux desktop screen, as they should be. After all , windows 8 sucks at trying to unite the phone with the desktop environment, because they're disparate platforms and everyone except Microsoft seems to know this.

Enjoy!