I am setting up a new infrastructure for our current project, mgirating from a 2 server in 2 locations to a new 3 servers/3 datacenters... which should allow us to have a higher high availability.  That said, I need to make a decision upon the installation of our new servers. We're using OVH as a provider and we choose to rent of their SP-32-2 servers. The specs are the following:  CPU:  Intel  Xeon E3-1245v5 - 4c/8t - 3,5GHz /3,9GHz RAM:  32GB DDR4 ECC 2133 MHz SSD:  SoftRaid 2x480GB SSD   Until now, in our 2 servers, we also had a SoftRaid active on their disks (160GB)... but now that we're increasing with one location, I was thinking what would be smarter in terms of performance:   Use a RAID1. Use a RAID0 (~similar performance as a single drive, but increased capacity?) Use the single disks.   This is the information I could get from the disks:  # smartctl --all /dev/nvme0n1 smartctl 6.6 2016-05-31 r4324 [x86_64-linux-3.14.32-xxxx-grs-ipv6-64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org  === START OF INFORMATION SECTION === Model Number:                       INTEL SSDPE2MX450G7 Serial Number:                      CVPF723400BN450RGN Firmware Version:                   MDV10271 PCI Vendor/Subsystem ID:            0x8086 IEEE OUI Identifier:                0x5cd2e4 Controller ID:                      0 Number of Namespaces:               1 Namespace 1 Size/Capacity:          450,098,159,616 [450 GB] Namespace 1 Formatted LBA Size:     512 Local Time is:                      Sun Oct 15 22:06:40 2017 UTC Firmware Updates (0x02):            1 Slot Optional Admin Commands (0x0006):   Format Frmw_DL Optional NVM Commands (0x0006):     Wr_Unc DS_Mngmt Maximum Data Transfer Size:         32 Pages  # hwinfo --disk 22: PCI 00.0: 10600 Disk   [Created at block.245]   Unique ID: wLCS.ESp_8PwlL47   Parent ID: B35A.rUHJNen1rs6   SysFS ID: /class/block/nvme0n1   SysFS BusID: 0000:02:00.0   SysFS Device Link: /devices/pci0000:00/0000:00:01.1/0000:02:00.0   Hardware Class: disk   Model: "Intel DC P3500 SSD [2.5" SFF]"   Vendor: pci 0x8086 "Intel Corporation"   Device: pci 0x0953 "PCIe Data Center SSD"   SubVendor: pci 0x8086 "Intel Corporation"   SubDevice: pci 0x3705 "DC P3500 SSD [2.5" SFF]"   Revision: "MDV1"   Serial ID: "CVPF723400BN450RGN"   Driver: "pcieport", "nvme"   Device File: /dev/nvme0n1   Device Number: block 259:0   Size: 879097968 sectors a 512 bytes   Capacity: 419 GB (450098159616 bytes)   Config Status: cfg=new, avail=yes, need=no, active=unknown   Attached to: #17 (Non-Volatile memory controller)  23: PCI 00.0: 10600 Disk   [Created at block.245]   Unique ID: nghH.tSE4xNK5_H1   Parent ID: svHJ.rUHJNen1rs6   SysFS ID: /class/block/nvme1n1   SysFS BusID: 0000:03:00.0   SysFS Device Link: /devices/pci0000:00/0000:00:1c.0/0000:03:00.0   Hardware Class: disk   Model: "Intel DC P3500 SSD [2.5" SFF]"   Vendor: pci 0x8086 "Intel Corporation"   Device: pci 0x0953 "PCIe Data Center SSD"   SubVendor: pci 0x8086 "Intel Corporation"   SubDevice: pci 0x3705 "DC P3500 SSD [2.5" SFF]"   Revision: "MDV1"   Serial ID: "CVPF7235000X450RGN"   Driver: "pcieport", "nvme"   Device File: /dev/nvme1n1   Device Number: block 259:5   Size: 879097968 sectors a 512 bytes   Capacity: 419 GB (450098159616 bytes)   Config Status: cfg=new, avail=yes, need=no, active=unknown   Attached to: #18 (Non-Volatile memory controller)   In order to answer, I guess it all depends on what we're running and what is our traffic. Ever server will be equal, running mainly: nginx, php, mysql and redis. This is a web server as you can see and it has high traffic and growing.  What would be the smarter decision when in terms of performance? I also need to point out that re-installation of the servers shouldn't be an issue as they all being installed with Ansible.  Thanks in advance!
This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?
"Open With" dialog ignores my selection Functions satisfying $f:\mathbb{N}\rightarrow\ \mathbb{N}$ and $f(f(n))+f(n+1)=n+2$ Find all functions $f$ such that $f:\mathbb{N}\rightarrow\  \mathbb{N}$ and $f(f(n))+f(n+1)=n+2$   Let us plug in $n=1$  $f(f(1))+f(2)=3$  Since the function is from $\mathbb{N}$ to $\mathbb{N}$, $f(2)$ can only take the values $1,2$. Now we divide the problem into cases.  Case-1: $f(f(1))=2,f(2)=1$  We can assume that $f(1)=c$ for the time being. Then plugging in $n=3$ and using $f(2)=1$ gives $$f(3)=4-c$$ and again since the range of the function is positive integers,then $4-c$ has to be positive and hence $c$ belongs to  {$1,2,3$}. Now, $$f(1)=c$$$$\implies f(f(1))=f(c)$$$$\implies 2=f(c)$$ by the assumption that $f(f(1))=2$ . Now,since $c$ can only take the values $1,2,3$,we start treating cases. If $c=1$,$$f(c)=2$$$$\implies f(1)=2$$ but we know from the deinition of $c$ that $f(1)=c=1$,a contradiction.If $c=2$,then $2=f(c)=f(2)$ but $f(2)=1$ by assumption. Finally,if $c=3$ $$2=f(c)=f(3)$$ but $$f(3)=4-c=4-3=1$$ which is once again a contradiction. Therefore there are no such functions in this case.  Case-2: $f(f(1))=1,f(2)=2$  Again assuming $f(1)=c$ and using $f(n)\le n$ along with plugging $n=c-1$ will give us that $f(1)=1$ and then it is easy to prove that such a function exists by recursion. I can only give a "sort of recursive" way to define the function. Here it goes $$f:\mathbb{N}\rightarrow \mathbb{N}$$$$f(1)=1$$$$f(n)=n+1-f(f(n-1))$$  But this case is harder to deal with.Some help will be appreciated. How to "pretty" format JSON output in Ruby on Rails I would like my JSON output in Ruby on Rails to be "pretty" or nicely formatted.   Right now, I call to_json and my JSON is all on one line.  At times this can be difficult to see if there is a problem in the JSON output stream.  Is there way to configure to make my JSON "pretty" or nicely formatted in Rails? Checking for null before event dispatching... thread safe? Something that confuses me, but has never caused any problems... the recommended way to dispatch an event is as follows:  public event EventHandler SomeEvent; ... {     ....     if(SomeEvent!=null)SomeEvent(); }   In a multi-threaded environment, how does this code guarantee that another thread will not alter the invocation list of SomeEvent between the check for null and the invocation of the event? Casting two cantrips, both modified by metamagic? Can you cast one cantrip, modifying it with "Twinned Spell" (Fire Bolt) to target 2 creatures, and then cast another cantrip as a Bonus Action (Fire Bolt), using "Quickened Spell" to target one of the previous creatures or another creature? Say we have a rod with a fixed axis of rotation. If we give it a push at some point other than the axis, it will start to rotate. Say our force is $F$, then we might write: $\Delta P=F\Delta t$. I’m wondering how to incorporate angular momentum here. We know that for a single particle it holds that $L=r\times p$. And for an extended object with a fixed axis of rotation, we generally might write $L=I\omega$. However, can I write $L=r\times p$ too for the extended object? I would think that I would need to integrate. So we have $p_\alpha=m_\alpha v_\alpha=m_\alpha r_\alpha\omega$, where we consider an infinitesimal mass $\alpha$. So should I write $L=\int r^2\omega\,dm$? I’m confused whether to work with this integral, or just use $L=r\Delta P$ at once.  The reason I'm asking, is because I'm trying to calculate the sweet spot of a baseball bat. So this is my attempt at solving the exercise. Query to list number of records in each table in a database Difference between Sort and SortBy Can I run an HTTP GET directly in SQL under MySQL? I'd love to do this:  UPDATE table SET blobCol = HTTPGET(urlCol) WHERE whatever LIMIT n;   Is there code available to do this? I known this should be possible as the  include an example of adding a function that does a DNS lookup.  MySQL / windows / Preferably without having to compile stuff, but I can.  (If you haven't heard of anything like this but you would expect that you would have if it did exist, A "proly not" would be nice.)  EDIT: I known this would open a whole can-o-worms re security, however in my cases, the only access to the DB is via the mysql console app. Its is not a world accessible system. It is not a web back end. It is only a local data logging system I'm using Chrome 32 on an Android tablet (not phone) and just can't figure out how to close all open tabs in one go. I think I've got it down to the most basic case:  int main(int argc, char ** argv) {   int * arr;    foo(arr);   printf("car[3]=%d\n",arr[3]);   free (arr);   return 1; }  void foo(int * arr) {   arr = (int*) malloc( sizeof(int)*25 );   arr[3] = 69; }   The output is this:  &gt; ./a.out   car[3]=-1869558540  a.out(4100) malloc: *** error for object 0x8fe01037: Non-aligned pointer                          being freed  *** set a breakpoint in malloc_error_break to debug &gt;   If anyone can shed light on where my understanding is failing, it'd be greatly appreciated. I am not sure if  works. Can someone please help me? My phone is new and in its warranty period so I can't root it yet. I tried this app but I am not sure if it actually did something. Unlike the other famous app on the PlayStore for fstrim, it doesn't require root access which is quite incredible. Consider a "wavefunction" $\psi(x)$, which has a Fourier transform $\tilde \psi(p)$  Suppose that we know, for each $x$, $|\psi(x)|^2$, and that we know, for each $p$, $|\tilde \psi(p)|^2$.  Have we enough information to reconstruct the "wavefunction" $\psi(x)$, that is, obtain the phase of the "wavefunction" for all $x$ (up to a global phase, we are only interesting to the relative phases between the $x$)? Potential difference across a zero resistance wire So I started off with electrostatics and everything seemed nice and mathematical and justified and then "DC circuits" happened!  I just cannot understand the model of electron flow in electrical circuits.  Here are my specific doubts-:  1) If potential difference across a tiny cross section of conducting wire is zero, then why on earth does electron flow across that cross section at all? Never mind potential difference across the whole circuit.   2) Is there a constant electric field across a wire connected to a battery? If yes then how is potential difference across a zero resistance wire constant?   Shouldnt it be increasing?  Doesnt it violate ohms law?  If no,  then why do electrons flow at all?  Please take time to consider these doubts and relieve me of my frustration.  I havs searched through the net for this but every answer seems like beating around the bush.  All of the 4 books I have consulted do not address these facts to my satisfaction.   Frankly I think nobody understands this. Do I have to enter the UK on my UK passport? I'm a British National (Overseas), which basically means that while I don't have the right of abode in the UK, I am permitted to visit the UK without a visa. However, my passport has expired, and while it's being renewed, the schedule is a bit tight.  At the same time, I'm an US Citizen, and since I'm only planning to visit the UK, I don't need a visa if I enter on my US passport.  I'm not familiar with UK immigration law, and given that this probably isn't too common a situation, the UK Border Agency website doesn't have an answer that I can can find, nor do they seem to have a contact form that fits my situation, so here's hoping someone knows—given that I'm a British National (Overseas), am I required to enter the UK on my UK passport, or can I just use my (valid) US passport? I've just installed Ubuntu on my Lenovo g460  with Windows 7. I am not able to play any movie or mp3 file. When I click on a file I'm asked to install a plugin. When I click on the install button nothing happens. I am trying to solve the following:  Let $W_t$ be a brownian motion and $a,b &gt;0.$  Define $\tau$ to be the exit time of $W_t$ from $[-a,b]$, that is $$\tau = \inf\{t \ge 0\ :\ W_{t}(\omega) \notin [-a,b]\}.$$  Show that $\tau$ is integrable and compute $\mathbb{E}(\tau)$.  I have seen this stated without proof multiple places that $\mathbb{E}(\tau)=ab.$  What is the logical argument that backs up this statement?  How are we guaranteed $\tau$ is integrable? What is the difference between "owing to" and "due to"? Why are irrational numbers uncountable and rationals countable? Question 1: Why are irrational numbers uncountable and rationals countable?  I really struggle to understand this. I initially thought it had something to with the fact that between any two numbers there will always be a irrational number. But now it has come to my attention that the same holds for rational numbers. So I can't really see the difference between them. What is it that makes the difference? Why can we line up all rational numbers one-to-one with the natural numbers, but not the irrationals with the naturals?  Sorry for a perhaps basic question, but I really, really struggle with it. Thanks. How can I find out which apps I have already downloaded on my iPhone? When you attempt to download an app that costs money, you will not be charged if you already bought the app. After you press buy and enter your iTunes password, it will say "You have already purchased this item. To download it again for free, select OK."  The problem is that I deleted hundreds of apps from my phone, some of which were paid for. Later on I might find an app I like but notice that it costs money. It might be an app I had already paid for, or an app which I got when it was free.  How can I know if I tap the buy button if I will be charged for the app or not?  In other words, how can I know if I owned a previous version of an app before?