U
U
Unicom2016-02-03 13:04:27
linux
Unicom, 2016-02-03 13:04:27

Debian 8 for weak VPS 64 or 32?

I was puzzled by the question of how many discharges are needed?
Given: cloud VPS (1GB RAM, fast SSDs)
Swap 2Gb
NGINX / REDIS / MariaDB / PHP FPM

It seems that even with swap (by the way, does swap count in memory addressing? Something jumped me ...), 4GB is not typed and even if I will expand the RAM to 2 GB, then the total volume will be 4 GB.

Here are some pies. What is the advantage of 32 bits is clear - less overhead for RAM, which is already small.
What are the considerations? I ask without answers "I swear by Mom, put 64!" and "I would install cent os".

UPD
Carried out tests (there are 2 test virtual machines Debian 8 32 and 64 bits respectively). After installing a web server with a binding (see above), the amount of free memory is identical within the error! Ran sysbench tests. On average, everything is identical. Besides the memory test!

64 bits

[email protected]:~# sysbench --test=memory --num-threads=4 --memory-total-size=1G run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing memory operations speed test
Memory block size: 1K

Memory transfer size: 1024M

Memory operations type: write
Memory scope type: global
Threads started!
Done.

Operations performed: 1048576 (2283965.19 ops/sec)

1024.00 MB transferred (2230.43 MB/sec)


Test execution summary:
    total time:                          0.4591s
    total number of events:              1048576
    total time taken by event execution: 1.4615
    per-request statistics:
         min:                                  0.00ms
         avg:                                  0.00ms
         max:                                 20.03ms
         approx.  95 percentile:               0.00ms

Threads fairness:
    events (avg/stddev):           262144.0000/2606.61
    execution time (avg/stddev):   0.3654/0.01

32 bits
[email protected]:~# sysbench --test=memory --num-threads=4 --memory-total-size=1G run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing memory operations speed test
Memory block size: 1K

Memory transfer size: 1024M

Memory operations type: write
Memory scope type: global
Threads started!
Done.

Operations performed: 1048576 (1216515.90 ops/sec)

1024.00 MB transferred (1188.00 MB/sec)


Test execution summary:
    total time:                          0.8620s
    total number of events:              1048576
    total time taken by event execution: 2.7441
    per-request statistics:
         min:                                  0.00ms
         avg:                                  0.00ms
         max:                                 20.02ms
         approx.  95 percentile:               0.00ms

Threads fairness:
    events (avg/stddev):           262144.0000/1919.49
    execution time (avg/stddev):   0.6860/0.03


Memory on a 64-bit machine is exactly twice as fast. I ran several tests with different values ​​- the results are identical.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2016-02-03
@opium

If there is even the slightest hope for the growth of projects, then install 64 bits, the loss is not great, and the extra move is unpleasant

S
sim3x, 2016-02-03
@sim3x

32
swap does not apply to RAM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question