|
| 1 | +apiVersion: batch/v1 |
| 2 | +kind: Job |
| 3 | +metadata: |
| 4 | + name: batching-test-500k |
| 5 | + namespace: dean-batching |
| 6 | + labels: |
| 7 | + test: 500k-blocks |
| 8 | + disk-type: hyperdisk-balanced |
| 9 | +spec: |
| 10 | + backoffLimit: 0 |
| 11 | + template: |
| 12 | + metadata: |
| 13 | + labels: |
| 14 | + app: batching-test-500k |
| 15 | + test: 500k-blocks |
| 16 | + spec: |
| 17 | + restartPolicy: Never |
| 18 | + nodeSelector: |
| 19 | + role: "apollo-core-service-c4d-standard-8" |
| 20 | + tolerations: |
| 21 | + - key: key |
| 22 | + operator: "Equal" |
| 23 | + value: "apollo-core-service-c4d-standard-8" |
| 24 | + effect: "NoSchedule" |
| 25 | + initContainers: |
| 26 | + - name: fix-permissions |
| 27 | + image: busybox |
| 28 | + command: ["sh", "-c", "mkdir -p /data/workspace && chmod -R 777 /data && ls -la /data/ && echo 'Permissions fixed!'"] |
| 29 | + volumeMounts: |
| 30 | + - name: data |
| 31 | + mountPath: /data |
| 32 | + containers: |
| 33 | + - name: batching-test |
| 34 | + image: ghcr.io/starkware-libs/sequencer/sequencer:dean-k8s_batching_test-fd3d4f1 |
| 35 | + workingDir: /tmp |
| 36 | + env: |
| 37 | + - name: RUST_LOG |
| 38 | + value: info |
| 39 | + - name: BLOCKS_TO_SYNC |
| 40 | + value: "500000" |
| 41 | + - name: BATCH_SIZE |
| 42 | + value: "1000" |
| 43 | + - name: PATH |
| 44 | + value: /app/target/release:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| 45 | + command: ["/bin/bash"] |
| 46 | + args: |
| 47 | + - -c |
| 48 | + - | |
| 49 | + set -e |
| 50 | + |
| 51 | + echo "=========================================" |
| 52 | + echo "DEAN'S BATCHING TEST: 0 → 500K" |
| 53 | + echo "Hyperdisk Balanced 1TB Performance Test" |
| 54 | + echo "=========================================" |
| 55 | + echo "" |
| 56 | + echo "Configuration:" |
| 57 | + echo " Blocks to sync: 500,000" |
| 58 | + echo " Batch size: 1,000" |
| 59 | + echo " Disk: Hyperdisk Balanced 1TB (80k IOPS, 1200 MB/s)" |
| 60 | + echo "" |
| 61 | + |
| 62 | + # Copy test script to /tmp first (always writable) |
| 63 | + echo "Setting up test script..." |
| 64 | + cp /test-scripts/test_batching.sh /tmp/test_batching.sh |
| 65 | + chmod +x /tmp/test_batching.sh |
| 66 | + |
| 67 | + # Clean workspace |
| 68 | + echo "Cleaning workspace..." |
| 69 | + cd /data/workspace |
| 70 | + find . -mindepth 1 -maxdepth 1 ! -name 'lost+found' -exec rm -rf {} + 2>/dev/null || true |
| 71 | + |
| 72 | + # Verify clean |
| 73 | + if [ -d "data_with_batching" ] || [ -d "data_without_batching" ]; then |
| 74 | + echo "ERROR: Workspace not clean!" |
| 75 | + exit 1 |
| 76 | + fi |
| 77 | + echo "✓ Workspace clean" |
| 78 | + echo "" |
| 79 | + |
| 80 | + # Run the test script from /tmp |
| 81 | + cd /data/workspace |
| 82 | + /tmp/test_batching.sh 2>&1 | tee test_output.log |
| 83 | + |
| 84 | + echo "" |
| 85 | + echo "=========================================" |
| 86 | + echo "TEST COMPLETE" |
| 87 | + echo "=========================================" |
| 88 | + resources: |
| 89 | + requests: |
| 90 | + cpu: "4" |
| 91 | + memory: "16Gi" |
| 92 | + limits: |
| 93 | + cpu: "8" |
| 94 | + memory: "32Gi" |
| 95 | + volumeMounts: |
| 96 | + - name: data |
| 97 | + mountPath: /data |
| 98 | + - name: configs |
| 99 | + mountPath: /configs |
| 100 | + readOnly: true |
| 101 | + - name: test-scripts |
| 102 | + mountPath: /test-scripts |
| 103 | + volumes: |
| 104 | + - name: data |
| 105 | + persistentVolumeClaim: |
| 106 | + claimName: dean-hyperdisk-extreme-pvc |
| 107 | + - name: configs |
| 108 | + configMap: |
| 109 | + name: sequencer-configs |
| 110 | + - name: test-scripts |
| 111 | + configMap: |
| 112 | + name: dean-test-scripts |
| 113 | + |
0 commit comments