0

'Was unsuccessful with internet searches, sorry in advance if redundant...

In using Artillery to test a DigitalOcean shared CPU droplet, would purposefully ramping up the load effect other users? Would pushing the load so high as to crash the server also crash other user's shared CPU droplets?

My first tests involve data API requests to an Express server, but will eventually want to do requests to React web pages.

'Trying to be a good neighbor.

PatrickReagan
  • 567
  • 5
  • 10

1 Answers1

1

No that shouldn't effect other users of the same CPU as the CPU is split using a hypervisor. So say a single machine runs 8 shared CPU instances. And each of those instances has 4 cores. You can apply as much load to a single core or multiple cores without affecting any other cores. The same applies on a per node level.

Though you could make an argument that applying more load increases the amount of heat generated (This probably isn't a problem in a datacenter application) it could also use more memory bandwidth but again this is probably not a problem. As long as the hypervisor is configured correctly.

Max Campbell
  • 595
  • 9
  • 22
  • 1
    The one correction I'd suggest is that with a 4 core CPU with 8 shared CPU instances, one app using it's max amount of CPU will make less CPU cycles available to other shared CPU instances. The hypervisor may limit how much of an affect it can have, but it will still be using CPU availability which will then not be as available to other instances and thus will have some effect. – jfriend00 May 08 '23 at 22:04
  • 1
    @jfriend00 I actually meant 8 Shared instances each with it's own 4 cores so 32 cores in total. My understanding is that CPU cycles are not shared between cores and each core is an isolated unit. Is that incorrect? – Max Campbell May 08 '23 at 22:22
  • 1
    I don't think that's correct. At some low level, the OS is allocating CPU core cycles to threads waiting to run. If one thread is hammering its CPU full-bore that makes less CPU cycles for all the other threads waiting to run. OS threads are not usually bound to only a specific CPU core. There is some affinity for the same core because that can help with caching, but if your core is busy and it's your thread's turn to get some scheduling time, the OS can put it on any core it has available. So, the more CPU cycles one thread uses, the less are available for the other threads. – jfriend00 May 08 '23 at 22:25
  • @jfriend00 So to confirm: pushing the Artillery arrival rate to the point that I crash my droplet could slow the response time experienced by other users (a little) but not crash the other users? – PatrickReagan May 09 '23 at 02:10
  • 1
    @PatrickReagan - You're not supposed to be able to crash other user's droplets in theory, but not all hypervisors are as bulletproof as they should be. – jfriend00 May 09 '23 at 02:24