What is the growth rate of $\sum_{n=1}^N \frac{a_n^2}{ \sum_{i=1}^n a_i } $? Suppose $a_1,a_2,\ldots$ are positive with $a_n \le \sqrt n$ say.   I know how to bound the sum $ \displaystyle \sum_{n=1}^N \frac{a_n}{\sqrt{\sum_{i=1}^n a_i }}$. We can use the concavity of $\sqrt x$ to get $$\displaystyle \frac{c}{2\sqrt{x+c}} \le \sqrt{x+ c}- \sqrt x $$ and so
$$\displaystyle \sum_{n=1}^N \frac{a_n}{\sqrt{\sum_{i=1}^n a_i }} \le 2\sum_{n=1}^N \left(\sqrt{\textstyle \sum_{i=1}^n a_i}-\sqrt{\textstyle\sum_{i=1}^{n-1} a_i}\right)\le 2 \sum_{i=1}^N a_i.$$
which is very nice.
Except now I am interested in bounding the squared sum $ \displaystyle \sum_{n=1}^N  \frac{a_n^2}{ \sum_{i=1}^n a_i } $. This is easy if we have $a_i \le C$. Then we can just pull out the extra $a_i$ and get
$$ \displaystyle \sum_{n=1}^N  \frac{a_n^2}{ \sum_{i=1}^n a_i } \le C\sum_{n=1}^N  \frac{a_n}{ \sum_{i=1}^n a_i }  \le C \log\left( \sum_{i=1}^N a_i \right)$$
where the last inequality uses the same argument as before with $\log x $ in place of $\sqrt x$. Unfortunately I am dealing with some numbers that might be unbounded.
Clearly if $a_n$ grow too quickly the sum might be about $\sum_{i=1}^N a_i$. But in that case it's probably about $a_N$ as well.
Extra: What I am actually trying to do is bound something like $ \displaystyle \sum_{n=1}^N \frac{a_n}{\sqrt{n\sum_{i=1}^n a_i }}$. The above comes from using Cauchy-Schwarz to get
$$ \displaystyle \sum_{n=1}^N \frac{a_n}{\sqrt{n\sum_{i=1}^n a_i }} \le \sqrt{ \sum_{n=1}^N \frac{1}{n}} \sqrt{\sum_{n=1}^N  \frac{a_n^2}{ \sum_{i=1}^n a_i }}.$$
The first factor is about $\sqrt{\log n}$ and it remains to bound the second.
 A: For the first inequality we do not really need convexity:
let $a_0=0$ and $A_N=\sum_{n=0}^{N}a_n$. We have
$$\begin{eqnarray*}\sum_{n=1}^{N}\frac{a_n}{\sqrt{A_n}}=\sum_{n=1}^{N}\frac{A_{n}-A_{n-1}}{\sqrt{A_n}}&=&\sum_{n=1}^{N}\left(\sqrt{A_{n}}-\sqrt{A_{n-1}}\right)\frac{\sqrt{A_{n}}+\sqrt{A_{n-1}}}{\sqrt{A_n}}\\&\color{red}{\leq}& 2\sum_{n=1}^{N}\left(\sqrt{A_{n}}-\sqrt{A_{n-1}}\right)=2\sqrt{A_N}\end{eqnarray*} $$
since the last sum is telescopic and $A_n$ is increasing. On the other hand if the sequence $\{a_n\}_{n\geq 1}$ is rapidly increasing (say $a_n=2^{n^2}$) we have
$$\sum_{n=1}^{N}\frac{a_n^2}{A_n}=\sum_{n=1}^{N}a_n\frac{a_n}{A_n}\sim \sum_{n=1}^{N}a_n=A_N $$
so in order to produce tight bounds we need more informations on the rate of growth of $\{a_n\}_{n\geq 1}$.
At the beginning of the post it is stated that $a_n\leq\sqrt{n}$, but in the middle $a_n=O(1)$ is assumed.
Which one should we actually take into consideration?
After the clarification occurred in the comment, we may notice that $a_n\sim n^c$ implies $A_n\sim \frac{1}{c+1} n^{c+1}$ and $\frac{a_n^2}{A_n}\sim (c+1)n^{c-1}$, such that
$$ \sum_{n=1}^{N}\frac{a_n^2}{A_n}\sim(c+1)\sum_{n=1}^{N}n^{c-1} \sim \left(1+\frac{1}{c}\right) N^{c}\sim K_c A_n^{\frac{c}{c+1}} $$
and there is no way to go beyond the $O\left(A_N^{\frac{c}{c+1}}\right)$ bound. Computations can be performed in explicit terms for a lot of sequences, like
$$ a_n = \frac{n}{4^n}\binom{2n}{n}\sim\sqrt{\frac{n}{\pi}},\qquad A_n = \frac{n(2n+1)}{3\cdot 4^n}\binom{2n}{n}\sim \frac{2n}{3}\sqrt{\frac{n}{\pi}}$$
$$ \frac{a_n^2}{A_n}=\frac{3n}{(2n+1)4^n}\binom{2n}{n}\sim\frac{3}{2\sqrt{n\pi}},\qquad \sum_{n=1}^{N}\frac{a_n^2}{A_n}\sim 3\sqrt{\frac{n}{\pi}}.$$
